Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically build a Visual Studio solution?

Is there a way to programmatically build Visual Studio solutions? E.g. if you are inside a console app, can you programmatically build an existing solution elsewhere?

like image 378
Daniel Avatar asked Oct 02 '09 18:10

Daniel


People also ask

How do I create a build and run solution in Visual Studio?

Build and run your code in Visual Studio To build your project, choose Build Solution from the Build menu. The Output window shows the results of the build process. To run the code, on the menu bar, choose Debug, Start without debugging. A console window opens and then runs your app.

How do I create a solution in Visual Studio?

To build or rebuild a single projectIn Solution Explorer, choose or open the project. On the menu bar, choose Build, and then choose either Build ProjectName or Rebuild ProjectName. Choose Build ProjectName to build only those project components that have changed since the most recent build.

What is a build Visual Studio?

Definition. A build is an option or a menu available in Visual Studio that is capable of performing an incremental build, whereas rebuild is an option or a menu in Visual Studio that cleans and builds the solution from scratch.


1 Answers

Sure- MSBuild is included on any machine with .NET 2.0 or better installed. Just call it and pass the solution file, or drive the MSBuild classes (see Microsoft.Build.BuildEngine.Engine) from your code to do it.

like image 163
nitzmahone Avatar answered Nov 13 '22 09:11

nitzmahone