14

Is there any powershell script exist to build visual studio project without open visual studio?

1 Answer 1

25

You don't even need power shell or visual studio. Just use the msbuild program installed with .Net. Usage example is like this:

msbuild DBMigration.csproj /p:Configuration=Debug

msbuild is located at C:\Windows\Microsoft.NET\Framework\v3.5 (or select your version)

There is also a powershell build system, https://github.com/JamesKovacs/psake

Sign up to request clarification or add additional context in comments.

2 Comments

I've found msbuild in C:\Program Files (x86)\MSBuild\14.0\Bin!
For VS2022 its found in: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe and C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.