How do I build a C# solution programmatically?
I should be able to pass the path of a solution and get the output messages (or just build the solution). How do I achieve this in C#?
I need this because we are building a single solution for our projects when it now gets everything from SVN and also builds it. Next would be deploying it all in one click.
Most of the answers are providing ways to do it by calling external commands, but there is an API, Microsoft.Build.Framework, to build via C#.
Code from blog post:
Note the code in that blog post works, but it is a little dated. The
Microsoft.Build.BuildEnginehas been broken up into some pieces.
Microsoft.Build.ConstructionMicrosoft.Build.EvaluationMicrosoft.Build.Execution