Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
705 views
in Technique[技术] by (71.8m points)

c# - 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. 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.

upggradeVCplusplus

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...