none
How to force Visual Studio 2015 Community to use default platform toolset.

    Question

  • Steps to reproduce:

    1.  Edit C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\Platform.Default.props so it just has the following two lines for setting the DefaultPlatformToolset and the PlatformToolset.

        <DefaultPlatformToolset>v140</DefaultPlatformToolset>
        <PlatformToolset>v140</PlatformToolset>

    2. Edit C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\Platform.Default.props so it just has the following two lines for setting the DefaultPlatformToolset and the PlatformToolset.

        <DefaultPlatformToolset>v140_xp</DefaultPlatformToolset>
        <PlatformToolset>v140_xp</PlatformToolset>

    Editorial note, yeah, I know.  I've just lost any chance of opening a VS 2010 Project.  That's a complete non-issue for me, I have completely upgraded to VS 2015, and have abandoned all earlier versions.

    3. Create a new solution.

    4. In the new solution inspect the project configuration.

    Expected:

    The platform toolset for win32 is v140_xp.

    Observed:

    The platform toolset for win32 is v140.

    It is also worth noting that the platform toolset in both cases is bold, meaning it has been overridden from the default.  This can be confirmed by right clicking on the toolset in the win32 settings, and selecting <Inherit ...>.  Doing so sets it to the default, which is v140_xp.

    What I need to know is how to prevent the platform toolset being overridden like this on solution creation.

    Monday, January 25, 2016 9:03 AM

Answers