与目标的MSBuild .NET的特定版本 [英] Target specific version of .NET with MSBuild

查看:279
本文介绍了与目标的MSBuild .NET的特定版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个是由一个MSBuild项目引用的溶液。在该解决方案,我在引用的目标.NET 4.0的几个项目。我怎么能告诉的MSBuild忽略项目的配置,只是针对.NET 3.5?

I have a solution that is being referenced by a MSBuild project. In the solution, I am referencing several projects that are targeting .NET 4.0. How can I tell MSBuild to ignore the project's configuration and just target .NET 3.5?

推荐答案

类似如下的命令应该工作

A command similar to the following should work

msbuild YourSolution.sln /tv:3.5 /p:TargetFrameworkVersion=v3.5

msbuild YourSolution.sln /p:TargetFrameworkVersion=v3.5

/电视(或/ toolsversion)表示要使用的MSBuild工具的版本,并且属性TargetFrameworkVersion指示目标框架。在你的情况下,只需指定属性应该是好的,但如果你想使用3.5的MSBuild工具集可以作为我的第一个命令做了与/电视sepcify它。

/tv (or /toolsversion) Indicates which version of the MSBuild tools you want to use, and the property TargetFrameworkVersion indicates the target framework. In your case just specifying that property should be fine, but if you want to use the 3.5 MSBuild toolset you can sepcify it with /tv as I did in the first command.

这篇关于与目标的MSBuild .NET的特定版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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