Scanning C# (Unity) project error

I’m trying to scan Unity project via GitHub Action, using flow from Sonarcloud wizard.
I generated .sln and .cproj using Unity Hub on my MacBook.
GitHub flow uses “dotnet build BoatAttack.sln”, which fails with

C:\Program Files\dotnet\sdk\5.0.403\Roslyn\Microsoft.CSharp.Core.targets(71,5): error MSB6004: The specified task executable location "/Applications/Unity/Hub/Editor/2020.3.23f1/\" is invalid. [D:\a\BoatAttack\BoatAttack\UnityEngine.TestRunner.csproj]

It’s right, github actions worker runs on Windows, not Mac. But I have no idea what I should put into .csproj.

Hi @vitalykarasik

sorry for the late reply on this one.

Did you look into GitHub - microsoft/MSBuildForUnity: MSBuild integration in Unity?

1 Like

Thank you!

1 Like

Any update on this issue?
Were you successful in using this method?

We are struggling getting any relevant analysis on our project (we are using bitbucket pipeline but I guess the capabilities are similar to Github actions)

No - we’re working with Codacy.

Hello @Vincent_Noel - can you share the steps that you tried to do? like build steps using MSBuild and eventual errors?