Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PowerShell Script To build Visual Studio Project

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

like image 646
Shahin Avatar asked Jan 13 '11 05:01

Shahin


People also ask

How do I run a Visual Studio project in PowerShell?

Project System You can also run PowerShell scripts by creating a PowerShell project within Visual Studio. To create a project, click File \ New \ Project and select the PowerShell language. Then, select the PowerShell Script project. A new project will be defined that contains a PS1 file.

What can you build with PowerShell?

As a scripting language, PowerShell is commonly used for automating the management of systems. It is also used to build, test, and deploy solutions, often in CI/CD environments.


1 Answers

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

like image 75
Matthew Talbert Avatar answered Sep 30 '22 18:09

Matthew Talbert