Udostępnij za pośrednictwem


Migration from VS2012 to VS2015 IDE only throws compiler upgrade warning

Irfan Ahmed, Senior Support Escalation(Languages EMEA team) brings to us this amazing write up in his own words. Read on!!

 While work on an issue; I came across a requirement where customer is migrating his project from VS2012 IDE to VS2015 IDE. Currently they are migrating only IDE of the project where they are still using the old compiler. There was a reason behind this. Let's don't go into that part.This brings a problem. Whenever a developer opens a the solution file, it throws a dialog warning "Update VC++ Compiler and Libraries" about the old compiler settings and ask you to upgrade. Screen Shot below. Looks familiar?

 

Its fine till the time you are choosing the right option of not upgrading to newer compiler but there are many developers working on the same project, there are chances that a developer migrate the compiler settings and checking in the source safe as well. This cause a bigger problem when all the developers will do get latest and get a copy where compiler setting is also updated and developers start getting different errors.

 Now the solution part. To make sure that developers doesn’t get the warning every time open the solution, make the following changes in the project file.

  <PropertyGroup Label="Globals">

   
<ProjectGuid>{75254B93-8568-4DE7-81F0-A67FBD62FDA7}</ProjectGuid>

   
<Keyword>Win32Proj</Keyword>

   
<RootNamespace>UserGPOInfo</RootNamespace>

       <VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>

 
</PropertyGroup>

 

Note: Please remove the above property once you are ready to migrate to new compiler.

 

Alternative approach ( Not recommended)

There is no project bases setting saved in the registry key and shouldn’t be. We need to make sure that any settings or change should be on solution/project bases. Having said that, I noticed that warning only comes when you first open the project in VS2015. Once you press OK or cancel, it saves it and don’t prompt warning again when you reopen the
project in VS2015. Internally, it creates a .VS folder which is hidden. This folder does have a project corresponding .suo file which contains this information. To avoid repetitive work of cancelling the warning, you can save the .VS folder for solution/project. It will be a one time job and keeping this folder in the solution file folder and save it to your source safe, will not throw you compiler warning again.

 

Hope the above post will be helpful.

 

Written and approved by: Irfan Ahmed, Senior Support Escalation Engineer