我要为我的C#解决方案可以自动生成过程。如何建立命令行C#解决方案,这样我就不必手动处理的依赖?
I want to automate the build process for my C# solutions. How can I build C# solutions from the command line so that I don't have to deal with dependencies manually?
推荐答案如果您从开始菜单打开Visual Studio命令提示符 - 那么你可以调用的MSBuild,给,要么.sln文件或特定的.csproj文件为了建立你所需要的。
if you open a visual studio command prompt from your start menu - then you can call MSBuild and give that either the .sln file or a specific .csproj file in order to build what you need
另外,您可以创建自定义的MSBuild文件需要的任务照顾。
alternatively you can create a custom MSBuild file that takes care of the tasks.
一个提示:请确保您使用的是适用于该项目的目标框架或工具版本
one tip: make sure the version of MSBuild that you use is applicable to the target framework or tools version of the project
即。如果你试图建立一个在VS2010用的MSBuild 3.5创建的解决方案,那么将无法识别4.0工具项目
i.e. if you try and build a solution that was created in vs2010 with msbuild 3.5 then it will not recognise the 4.0 toolset of the project
更多推荐
在命令行大厦C#解决方案Visual Studio 2010中
发布评论