如何防止Visual Studio提示将项目.NET 4升级到.NET 4.5 [英] How to prevent Visual Studio to prompt to upgrade projects .NET 4 to .NET 4.5

查看:173
本文介绍了如何防止Visual Studio提示将项目.NET 4升级到.NET 4.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#,C ++ / CLI中以.NET 4为目标的项目中有一个解决方案,并且在.NET4中有一些依赖性。当我在Visual Studio 2013中打开此解决方案时,它会提示您升级该解决方案。我们远程团队中的某些开发人员不会阅读消息框,而只是按OK。项目升级后,依赖项不兼容,然后他们向我发送邮件,指出无法构建该解决方案。

I have a solution in with project in C#, C++/CLI targeted to .NET 4 and with some dependencies in .NET4. When I open this solution in Visual Studio 2013 it prompts for upgrading the solution. Some developers in our remote teams don't read the messagebox and just press OK. The dependencies are not compatible after project upgrade and then they are mailing me that the solution cannot be built.

是否有某种方法可以关闭此.NET Framework升级提示?

Is there some way to turn off this prompts for .NET Framework upgrade?

推荐答案

将以下行放在项目文件的全局属性部分。

Put the following line in the global property section of your project file.

<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>

在上下文中:

<PropertyGroup Label="Globals">
    ...
    <VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
</PropertyGroup>

适用于Visual Studio 2015&

Works for Visual Studio 2015 & 2017 as well.

您也需要在升级时将其删除。

You will need to remove it when you want to do the upgrade.

来源: https://blogs.msdn.microsoft.com/dsvc/2015/12/13/migration-from-vs2012-to-vs2015-ide-only-throws-compiler-upgrade-warning/

这篇关于如何防止Visual Studio提示将项目.NET 4升级到.NET 4.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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