[BUG] MSBuild.exe (Visual Studio 2019) on Windows-latest is not in system PATH #25540
-
BUG: MSBuild.exe (Visual Studio 2019) on Windows-latest is not in system PATH > msbuild src$Env:solutionname -property:Configuration=Debug -m -v:m
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thank you for being here! This error is due to msbuild is not added to the path correctly. On Github runner, msbuild is not added into PATH by default. Add solution for other guys:
|
Beta Was this translation helpful? Give feedback.
-
Visual Studio does not put MSBuild in the path so I don’t think it is appropriate that we do. You should reference MSBuild from its fully qualified location in order to make sure you are running the right version. |
Beta Was this translation helpful? Give feedback.
Thank you for being here! This error is due to msbuild is not added to the path correctly. On Github runner, msbuild is not added into PATH by default.
Add solution for other guys:
add the env path, code as below:
echo “::add-path::C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin”
or use action ‘warrenbuckley/Setup-MSBuild’ before msbuild command.