New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# code not analyzed - Version 7.3 (build 5690) #1828
Comments
If you look at the release notes of SonarC# 7.0 you will see that we talk about a breaking change which forces you to have at least VS2015 Update 3 or MSBuild 14 Update 3 (the latest available for download on Microsoft website). The warnings you are referring to are because we rely on Roslyn 1.3.1 ( |
Thanks for your quick response @Evangelink, I have tried with these two MSBuild versions: And none seems to work, I'm still missing something there. |
Sorry for this really late answer but I was off before. Could you check if one of your projects is referencing the If you still have any issue, could you try and create a small console app and analyze it to see if you also have the issue or not? Cheers, |
Hello Amaury,
Thanks a lot for your time, right now I have to deal with a lot of other priorities, I guess I’ll open a new thread once I can start again on this, thanks again for your attentio, I really appreciate it.
Best regards,
Francisco Alonso.
From: Amaury Levé <notifications@github.com>
Sent: Monday, October 1, 2018 10:31 AM
To: SonarSource/sonar-csharp <sonar-csharp@noreply.github.com>
Cc: Arturo Alonso, Francisco (Cognizant) <Francisco.ArturoAlonso@cognizant.com>; Mention <mention@noreply.github.com>
Subject: Re: [SonarSource/sonar-csharp] C# code not analyzed - Version 7.3 (build 5690) (#1828)
Hi @franciscoarturoalonso<https://github.com/franciscoarturoalonso>,
Sorry for this really late answer but I was off before. Could you check if one of your projects is referencing the Microsoft.Net.Compilers nuget? If so you need to update it to at least 1.3.1
If you still have any issue, could you try and create a small console app and analyze it to see if you also have the issue or not?
Cheers,
Amaury
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1828 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AoCcqatVIGftd9PHWJtrtt8OOYVL-FvAks5ugdLQgaJpZM4WXqOG>.
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
|
Thanks a lot. It takes my three days to solve the problem.My project is built in VS2017,and my sornarQube's version is 7.8. |
Description
Configured a local instance of SonarQube 7.2.1
Trying to analyze a solution targeting .Net 4.5.2
Getting the analysis only for the JavaScript files, nothing for the cs files, they are shown in the project but no results for them.
Getting a lot of messages like these in the build:
CSC : warning CS8032: An instance of analyzer SonarAnalyzer.Rules.CSharp.ThreadStaticWithInitializer cannot be created from C:\Users\user\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [\\Repositories\_GitHubRepo\.D\.D.csproj] CSC : warning CS8032: An instance of analyzer SonarAnalyzer.Rules.CSharp.MutableFieldsShouldNotBePublicReadonly cannot be created from C:\Users\user\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [\\Repositories\_GitHubRepo\.D\.D.csproj] CSC : warning CS8032: An instance of analyzer SonarAnalyzer.Rules.CSharp.GetHashCodeEqualsOverride cannot be created from C:\Users\user\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.. [\\Repositories\_GitHubRepo\.D\.D.csproj]
The dlls and assembly are in place.
And these warnings in the end step:
WARN: Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. WARN: No roslyn issues report not found for this project. WARN: Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project. WARN: No roslyn issues report not found for this project. WARN: Analyzer working directory does not exist: 'D:\\Repositories\_GitHubRepo\.sonarqube\out\0\output-cs'. Analyzer results won't be loaded from this directory. WARN: Analyzer working directory does not exist: 'D:\\Repositories\_GitHubRepo\.sonarqube\out\1\output-cs'. Analyzer results won't be loaded from this directory. WARN: Analyzer working directory does not exist: 'D:\\Repositories\_GitHubRepo\.sonarqube\out\2\output-cs'. Analyzer results won't be loaded from this directory. WARN: Too many duplication references on file /Scripts/jquery-1.10.2.intellisense.js for block at line 2. Keep only the first 100 references. WARN: Too many duplication references on file /Scripts/jquery-1.10.2.intellisense.js for block at line 2. Keep only the first 100 references. WARN: Too many duplication references on file /Scripts/jquery-1.10.2.intellisense.js for block at line 2. Keep only the first 100 references.
Repro steps
"C:\Program Files\sonarqube-7.2.1\sonnarscanner-msbuild\net46\SonarScanner.MSBuild.exe" begin /k:MyKey /d:sonar.verbose=true > BEGIN
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" /t:Rebuild .\Solution.sln > BUILD
"C:\Program Files\sonarqube-7.2.1\sonnarscanner-msbuild\net46\SonarScanner.MSBuild.exe" end > END
Expected behavior
Report on the C# code.
Actual behavior
Only results for the JavaScript code.
Known workarounds
Please provide a description of any known workarounds.
Related information
Please, let me know if there's more information needed to help diagnose.
Thanks in advance for your help!
Francisco.
The text was updated successfully, but these errors were encountered: