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

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

问题描述

我在 C#、C++/CLI 中针对 .NET 4 的项目和 .NET4 中的一些依赖项中有一个解决方案.当我在 Visual Studio 2013 中打开此解决方案时,它会提示升级该解决方案.我们远程团队中的一些开发人员不会阅读消息框,只需按确定"即可.项目升级后依赖不兼容,然后他们给我发邮件说无法构建解决方案.

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 &2017 年也是如此.

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天全站免登陆