在命令行大厦C#解决方案Visual Studio 2010中 [英] Building C# solutions from command line with Visual Studio 2010

查看:162
本文介绍了在命令行大厦C#解决方案Visual Studio 2010中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要为我的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中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆