I’m new to SonarCloud. I was able to setup my Swift project scan but I am having issues setting up my C# (.net Framework) project.
I added these lines to my pipeline yml file
- SonarScanner.MSBuild.exe begin /k:“my key” /o:“my organisation” /d:sonar.login=“my token”
- MSBuild.exe xxxx.sln /t:Rebuild
- SonarScanner.MSBuild.exe end /d:sonar.login=“My token”
But when I run the pipeline I get a “SonarScanner.MSBuild.exe: command not found” error.
How do I install MSBuild ?
Is it scripted in the bitbucket pipeline yml file ?
I use both SonarCloud and Bitbucket cloud. Nothing installed on my premises.
OK, looks like I need to install MSBuild in the Bitbucket pipeline docker before I can call MSBuild.
Since the docker is on linux, is it possible to build my .net Framework app ?
I think I need to use mono but I’m really not familiar with linux environments.
Also, there might be a prebuild docker image somewhere?
You’re right. I don’t think it’s currently possible to pull a windows-based image on BitBucket right now. So it might be tricky to setup a “mono” build image on linux, not impossible though.
I might suggest you to move this pipeline on Azure DevOps (not the code, only the pipeline), which has better support for those kind of solutions.