0

So my team uses VS2013 right now and I just recently proved that I can run our project with VS2017. So I was wondering if there is a way I can push my changes to our master branch without my team noticing anything. This means if they open up their VS2013 they run the project just fine and, when I run it with VS2017 it runs fine too. (It won't do that right now because the 3rdParty libraries were compiled with msvc 1800 and with my project running at msvc 1900 it gives me linking errors)

Can I take advantage of MSBuild conditionals to do this?

<Choose>  
    <When Condition=" '$(Configuration)'=='Debug' ">  
        <PropertyGroup>  
            <DebugSymbols>true</DebugSymbols>  
            <DebugType>full</DebugType>  
            <Optimize>false</Optimize>  
            <OutputPath>.\bin\Debug\</OutputPath>  
            <DefineConstants>DEBUG;TRACE</DefineConstants>  
        </PropertyGroup>  
        <ItemGroup>  
            <Compile Include="UnitTesting\*.cs" />  
            <Reference Include="NUnit.dll" />  
        </ItemGroup>  
    </When>  
    <When Condition=" '$(Configuration)'=='retail' ">  
        <PropertyGroup>  
            <DebugSymbols>false</DebugSymbols>  
            <Optimize>true</Optimize>  
            <OutputPath>.\bin\Release\</OutputPath>  
            <DefineConstants>TRACE</DefineConstants>  
        </PropertyGroup>  
    </When>  
</Choose>  
  • You can try to build your project in Visual Studio 2017 with platform toolset "Visual Studio 2013(v120)", check if it build fine. https://stackoverflow.com/questions/19575747/error-lnk2038-mismatch-detected-for-msc-ver-value-1600-doesnt-match-valu – Leo Liu Oct 26 '17 at 06:34
  • You need to clarify some things: when you open the project with VS2017, so you want to build it using the compiler/linker which ship with VS2017, or those from VS2013? What do you want to do with MsBuild conditionals? Do you have an example of functionality which should be built/used conditionally? – stijn Oct 26 '17 at 07:36

1 Answers1

0

You should can use VS17 and your Team VS13. If you opening the project in VS17, don't upgrade your Windows SDK version and platform toolset and the team and you can build as usual, but you cannot use new C++ features, because the older VS13 compiler cannot compile them

Lord_Curdin
  • 957
  • 1
  • 14
  • 27