如何建立在C#编程的解决方案? [英] How do i build a solution programatically in C#?
问题描述
我如何编程生成C#的解决方案?我应该能够通过一个解决方案的道路,并得到输出消息(或只是构建解决方案)我如何在C#中实现这一目标?
How do I build a C# solution programatically? 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#?
推荐答案
你们中的大多数都所提供的方式调用外部命令来做到这一点,但有是的一个API,<一个href=\"http://msdn.microsoft.com/en-us/library/microsoft.build.framework.aspx\">Microsoft.Build.Framework,通过C#来构建
Most of you all are providing ways to do it by calling external commands, but there is an api, Microsoft.Build.Framework, to build via C#
本博客,有一个非常简单的例子<一个href=\"http://blog.click2refer.com/2011/01/automated-compilation-of-visual-studio-projects-through-c-using-msbuild/\">Automated通过C#中使用的MSBuild Visual Studio项目的编制
This blog that has a very basic example Automated compilation of Visual Studio Projects through C# using MSBuild
请注意在博客作品code,但有点过时了。
Note the code in that blog works, but is a little dated the
Microsoft.Build.BuildEngine
已经被分成几片
Microsoft.Build.Construction
Microsoft.Build.Evaluation
Microsoft.Build.Execution
这篇关于如何建立在C#编程的解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!