简体   繁体   English

如何防止Visual Studio提示将项目.NET 4升级到.NET 4.5

[英]How to prevent Visual Studio to prompt to upgrade projects .NET 4 to .NET 4.5

I have a solution in with project in C#, C++/CLI targeted to .NET 4 and with some dependencies in .NET4. 我有一个C#项目的解决方案,C ++ / CLI针对.NET 4以及.NET4中的一些依赖项。 When I open this solution in Visual Studio 2013 it prompts for upgrading the solution. 当我在Visual Studio 2013中打开此解决方案时,它会提示升级解决方案。 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. 项目升级后依赖项不兼容,然后他们发邮件告诉我无法构建解决方案。

upggradeVCplusplus

Is there some way to turn off this prompts for .NET Framework upgrade? 有没有办法关闭.NET Framework升级的提示?

Put the following line in the global property section of your project file. 将以下行放在项目文件的全局属性部分中。

<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>

in context: 在上下文中:

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

Works for Visual Studio 2015 & 2017 as well. 适用于Visual Studio 2015和2017。

You will need to remove it when you want to do the upgrade. 如果要进行升级,则需要将其删除。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM