-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
MSBuild 15 on macOS with Mono does not work with SonarQube MSBuild Scanner #1956
Comments
Could you share a gist of the diagnostic build log? Collect it with And which version of mono are you using? |
Sure, no problem at all! I've created a clean solution via Xamarin with a PCL, an iOS and an Android project inside of it. I ran SonarQube's begin on the project which created the .sonarqube folder in my solution directory. Then I execute https://gist.github.com/nextmunich/aa23c2a11785390d2272b5e4f3404305 I've also tried to build with the added Import line in the PCL project (I'm unsure whether this is necessary or not, I think I was experimenting or came across this in some other thread). The Gist for the build output which I receive when the import is included can be found in the following Gist: https://gist.github.com/nextmunich/c1ab0b01aa58d202abf5eb0785f78b52 The mono version is:
|
I think the With the upcoming version of Mono, |
@radical thanks for your help - that does, indeed, work for me! Now I'm running into issues with the scanner itself but that should not be related to MSBuild in any way. |
when i run mono /var/jenkins_home/tools/sonar-scanner-msbuild/SonarQube.Scanner.MSBuild.exe end
|
i am using MSBuild 14.1 |
@chiraggb Same as - #1956 (comment) . You should update to the latest Mono also, which will have a newer msbuild too. Also, I can't re-open the issue, so could you create a new one? |
I'm not sure whether this is, in fact, a bug in MSBuild but I don't seem to find any other place to ask for help (my StackOverflow question did not yield any results).
When trying to use SonarQube MSBuild Scanner with MSBuild 15 on macOS with a Xamarin solution, the MSBuild build does not seem to produce the output expected by the scanner.
I can successfully run the scanner's "begin" using mono like so:
mono sonar-scanner-msbuild-2/SonarQube.Scanner.MSBuild.exe begin /k:"KEY"
The command creates the following files:
I'm running MSBuild using:
msbuild /t:Rebuild
Now the build starts correctly but eventually terminates with two errors:
The scanner is invoked to end the scan process like so:
mono sonar-scanner-msbuild-2/SonarQube.Scanner.MSBuild.exe end
This outputs the following information:
What's missing in MSBuild on macOS to make this work?
Moreover, I stumbled upon information somewhere that indicated that it might be required to add an import for the scanner's targets to the .csproj files in the solution:
<Import Project="sonar-scanner-msbuild-2/Targets/SonarQube.Integration.ImportBefore.targets" />
But when I do this and run the build, MSBuild complains with the following:
Checking the file system, the file does actually exist. Why would MSBuild not be able to find / access this file? Is there anything that can be done about it?
Any feedback is greatly appreciated!
The text was updated successfully, but these errors were encountered: