we are using sonar for analysing C# solutions. We need to use the REST API of sonar so we update it to the 4.3 version. Now we see that the .NET Ecosystem has change and following the Upgrade from the .NET Ecosystem shows how now works the runner with .NET projects. I activated the Visual Studio Bootstrapper because I was getting this error:
ERROR: Caused by: The property "sonar.cs.fxcop.assembly" must be set.
but when I run again the runner I still got that error and looking in the log I found this lines for the projects of the solution
16:02:27.280 INFO - Locating the assembly for the project: XXX...
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\Debug_AnyCPU\XXX.dll
16:02:27.280 WARN - The properties "sonar.dotnet.buildConfiguration" and "sonar.dotnet.buildPlatform" are deprecated
16:02:27.280 INFO - The following candidate assembly was found, but rejected because it does not match the request build configuration and platform: <somepath>\Release_AnyCPU\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\DebugExpress_AnyCPU\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\ReleaseExpress_AnyCPU\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\Debug_x64\XXX.dll
16:02:27.280 WARN - The properties "sonar.dotnet.buildConfiguration" and "sonar.dotnet.buildPlatform" are deprecated
16:02:27.280 INFO - The following candidate assembly was found, but rejected because it does not match the request build configuration and platform: <somepath>\Release_x64\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\DebugExpress_x64\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\ReleaseExpress_x64\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\Debug_x86\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\Release_x86\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\DebugExpress_x86\XXX.dll
16:02:27.280 INFO - The following candidate assembly was not built: <somepath>\ReleaseExpress_x86\XXX.dll
16:02:27.280 WARN - Unable to locate the assembly of project <somepath>\XXX\XXX.csproj
My configurations file are:
runner:
sonar.sourceEncoding=UTF-8
#----- Security (when 'sonar.forceAuthentication' is set to 'true')
sonar.cs.fxcop.fxCopCmdPath=C:\\Program Files (x86)\\Microsoft Fxcop 10.0\\
project:
# Project identification
sonar.projectKey=XX:XXX
sonar.projectVersion=1.1
sonar.projectName=XXX
# Info required for Sonar
sonar.sources=.
sonar.language=cs
#sonar.dotnet.key.generation.strategy=safe
sonar.sourceEncoding=UTF-8
#sonar.dotnet.key.generation.strategy=safe
sonar.gendarme.mode=skip
sonar.ndeps.mode=skip
sonar.stylecop.mode=skip
I hope any can help me with this because I seems we can't still using sonar for our analysis and coverage process.
Did you manage to solve your error in the end?
I was getting the same error and it got solved indeed by adding the Analysis bootstrapper for Visual Studio projects plugin to the Sonar server.
My sonar project properties file contains only this fxcop information:
sonar.fxcop.installDirectory=C:\\Program Files (x86)\\Microsoft Fxcop 10.0\\
From your logs, it seems that the Visual Studio Bootstrapper did manage to find some assembly candidates, but they did not match your requested build configuration and build platform.
Remove the values for sonar.dotnet.buildConfiguration and sonar.dotnet.buildPlatform in the SonarQube Settings page under "Settings > Visual Studio Bootstrapper > Deprecated".
Moreover, sonar.cs.fxcop.fxCopCmdPath should be set to the full path of FxCop, including the trailing "FxCopCmd.exe" part.
Related
I have existing app that uses MySQL Server. Some errors I was getting when trying to add a new feature led me to upgrading to 'MySql.Data.EntityFramework 8.0.11'.
error I am getting when on:
public CitiesContext() : base("name=CitiesContext"):
An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Under my properties, my target framework is still version 4.6.1.
Is there a 'how to document' somewhere on how to upgrade the EntityFrame work? I know several of the other installed packages were installed while targeting v 4.6.1, so lots of other types of errors using (like hay this was compiled with v 4.6) when trying to compile with a web.congf using
I have installed
PM> Install-Package EntityFramework -Version 6.4.4
Package 'EntityFramework.6.4.4' already exists in project 'Lat34North'
Time Elapsed: 00:00:00.0186347
Please note. This is a hobby for me, not a profession. The app is written using asp.net mvs an first issued in 2018. Do I just need to change the target in the properties and upgrade all the other packages??
Thank you for any help.
I've download nopCommerce 3.80 fresh code from github and publishing it from Visual Studio 2017 framework and I'm getting DLL related error.
Here are error messages.
------ Build started: Project: Nop.Services, Configuration: Release Any CPU
SGEN : error : Could not load file or assembly ..\nopCommerce_3.80_Source\packages\EPPlus.4.1.0\lib\net40\EPPlus.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Build started: Project: Nop.Web.Framework, Configuration: Release Any CPU
CSC : error CS0006: Metadata file '..\nopCommerce_3.80_Source\Libraries\Nop.Services\bin\Release\Nop.Services.dll' could not be found
------ Build started: Project: Nop.Web, Configuration: Release Any CPU
CSC : error CS0006: Metadata file '..\nopCommerce_3.80_Source\Presentation\Nop.Web.Framework\bin\Release\Nop.Web.Framework.dll' could not be found
4>------ Skipped Publish: Project Nop.Web, Configuration: Release Any CPU ------**
Solution is successfully building in debug and build mode.
What can be wrong with DLL at publish time?
I get the solution by unblocking the error dll file by right click of that dll in their properties option.
I am trying to build a sample webapi project using VS-2017 community in openshift with .netcore 1.1 template but its an building error.
Cloning "https://github.com/kuntal-b/netcoreWebAPI" ...
Commit: 84b604df745890311a7d23451c4bbef6552d1fb1 (2)
Author: kuntal.bose01#gmail.com Date: Thu
May 25 23:11:27 2017 +0530 Pulling image
"registry.access.redhat.com/dotnet/dotnetcore-11-rhel7#sha256:7c775cc11b280105f51bf2622ed79036c7f961e1cb9db23c4b17c66606154f7b"
... Pulling image
"registry.access.redhat.com/dotnet/dotnetcore-11-rhel7#sha256:7c775cc11b280105f51bf2622ed79036c7f961e1cb9db23c4b17c66606154f7b"
...
---> Copying application source ...
---> Installing dependencies ... warn : The folder '/opt/app-root/src' does not contain a project to restore.
---> Building application ... Couldn't find 'project.json' in '.' error: build error: non-zero (13) exit code from
registry.access.redhat.com/dotnet/dotnetcore-11-rhel7#sha256:7c775cc11b280105f51bf2622ed79036c7f961e1cb9db23c4b17c66606154f7b
Building application ... Couldn't find 'project.json' in '.' error:
.net core 1.1 template don't have a project.json file.
Using s2i with dotnetcore will only work in openshift with the old project.json based projects. This will be fixed once .net standard 2.0 is released.
Check: https://github.com/redhat-developer/s2i-dotnetcore/issues/46
I'm trying to install and run x64 Mercurial 3.8.3, but I'm getting the following error:
D:\Program Files\Mercurial>hg.exe
The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
Running sxstrace.exe gives the following log:
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = AMD64
CultureFallBacks = en-US;en
ManifestPath = D:\Program Files\Mercurial\hg.exe
AssemblyDirectory = D:\Program Files\Mercurial\
Application Config File =
-----------------
INFO: Parsing Manifest File D:\Program Files\Mercurial\hg.exe.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
INFO: Resolving reference for ProcessorArchitecture amd64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\WINDOWS\WinSxS\manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9177_none_acd40623e1d81331.manifest
INFO: Begin assembly probing.
INFO: End assembly probing.
ERROR: Activation Context generation failed.
End Activation Context Generation.
It seems like it's looking for C:\WINDOWS\WinSxS\manifests\amd64_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.9177_none_acd40623e1d81331.manifest, which doesn't exist on my computer. I think this file comes from the Microsoft Visual C++ 2008 Redistributable Package (x64), but when I installed/repaired it I still get the same error.
I've also come across this same package from chocolatey, but its version history seems to indicate that its latest version is 9.0.30729.6161, not the 9.0.30729.9177 I'm looking for. I'm not sure where to find this version of the package.
I've already looked at these questions which seem very similar to my situation:
Side by Side configuration is incorrect error
Visual Studio 2012 Side by side configuration is incorrect
Edit: I've just reinstalled with x86 Mercurial and it works. Not ideal, but at least it's a workaround.
Microsoft Visual C++ 2008 Redistributable Package 9.0.30729.9177 doesn't seem to be publicly available, so I ended up reinstalling Windows. Now I can run Mercurial after installing it.
I cloned the drill git repository and when I run
mvn clean package -DskipTests
I get this error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (validate_java_and_maven_version) on project drill-root: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
You need to use JDK 1.7 to build Apache Drill.
The Drill team added maven-enforcer-plugin to the build process to make sure that build gives an error if someone tries to build using an unsupported version of Java or Maven. If you scroll up you will see an earlier error message like the following:
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (validate_java_and_maven_version) # drill-root ---
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.8.0-51 is not in the allowed range [1.7,1.8).
A lot of people want to run Drill using JDK 1.8. There's good news on that front. While you can't build using JDK 1.8, once you've built, you can run Drill with JDK 1.8 just fine.