Reputation: 16216
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?
Upvotes: 6
Views: 1160
Reputation: 121
You should no longer use the Microsoft.Build.BuildEngine.Engine class. Per MSDN, "This class has been deprecated. Please use Microsoft.Build.Evaluation.ProjectCollection from the Microsoft.Build assembly instead."
Upvotes: 0
Reputation: 13940
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.
Upvotes: 6