Visual Studio using a compiler older than 2012 for a project converted in 2013

I inherited the (small) build system from VS2012, which our team wants to take on VS2013. I launched the wizard for the “convert” solution in 2013, and it obediently changed VisualStudioVersion and Project ToolsVersion in various .vcxproj files to “12.0” and added a few extra fields here and there without error or warning messages.

But the IDE still shows these projects in 2012:

Solution 'foo'
   Bar (Visual Studio 2012)

And the IDE still allows me to “update” these projects. I noticed that the conversion process did not touch the .props files either, and I went through and manually updated them, but it does not seem to use the latest version of the compiler, and the IDE is still confused - or isn't.

I'm new to MSBuild, so maybe this is a simple missing flag somewhere - hopefully?

In addition, I get a ton of schema warnings about the first build, but I think this is a well-known feature from my research.

What else should I take a peek here?

+4
source share
1 answer

Ensure that each group of configuration properties (i.e. each group that defines the assembly configuration) is targeted at the 2013 compiler in the PlatformToolset element:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <PlatformToolset>v120</PlatformToolset>
    ...
</PropertyGroup>

, - Condition Label. .vcxproj - , / , , . .

-, , v120.

, . , ImportGroup vcxproj , , , Property Manager Visual Studio - | node, , .

, CLR, v4.5.1:

<Project>
    <PropertyGroup Label="Globals">
        <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
        ...
    </PropertyGroup>
</Project>
+4

Source: https://habr.com/ru/post/1612634/


All Articles