I’m using Bitbucket yml file to build the .Net core project. But the build is failing due to ‘Task MSBuild execution failed’
It is actually looking for MSBuild.exe file along with the solution file during the build. As I’m performing the operation in Linux, I’m using Xbuild module with the build.
How can I mention the MSBuild.exe with the solution file when I’m executing the above script through bitbucket. Also how can I install MicrosoftSDK framework and mention the. Exe file in the yml file?
I don’t actually see anything related to SonarCloud here. If you take analyzing with SonarCloud out of the mix, do you still have problems? Are you using an example from somewhere?
If you run a build on linux and want to analyze with the Scanner for MSBuild, you’d better look at the dotnet CLI along with this community thread that explains how it should be configured.
I’ve actually followed the same example which you have posted in the comments (Bitbucket pipe+ Sonarcloud +. Net core)
But the build is failing with the following error:
Task “MSBUILD” execution - - FAILED
Warnings : /opt/atlasssian/agent /build/B. Sln warning : opt/atlasssian/agent /build/A/A.csproj : DATA at the root level is invalid. Line 1 position 1
opt/atlasssian/agent /build/B.sln warning: Don’t know how to handle globalsection extensibility globals, ignoring.
The build is actually not failing when its running in the local host.
When I’ve tried to scan the project using the Bitbucket-pipelines.yml file as per the example, just to analysis the code coverage, I’m getting the error which I’ve mentioned above.