question

Rachel-7376 avatar image
0 Votes"
Rachel-7376 asked Bruce-SqlWork answered

How to run MSBuild.exe as admin from the command line in GitHub pipeline?

I'm using a simple step in Github pipeline to build a project:

 - name: Build Solution
     run: |
       msbuild.exe ${
                 { env.PROJ_PATH }} /p:Configuration=Release


I need this command to run in elevated mode. (e.g If I'd compile this project manually, I'd open Visual Studio as administrator.)

How can I do it in the command?

Thank You!


dotnet-csharpvs-msbuild
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

as the GitHub pipeline runs on linux, it is the sudo command. But you need the superuser password to use sudo. why would you need su permission for a build?









5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.