Compiling for ToolsVersion 12 with Visual Studio 2015

前端 未结 1 1549
陌清茗
陌清茗 2021-01-11 17:32

I setup a new computer and installed VS2015. Compiling the project I am currently work on results in some invalid code (ILSpy creates uncompilable sources). It worked fine i

相关标签:
1条回答
  • 2021-01-11 17:54

    I'm leaving this answer here in case it helps anyone else, however it hasn't helped the original poster, as according to @user1029883 it doesn't work when VS2015 is installed with the 12.0 Build Tools (see @alexandrul's comment below) instead of multiple versions of Visual Studio: sorry.


    Unfortunately, there doesn't seem to be a straightforward way to do this. There is, however, a fiddly way:

    • Set the environment variable MSBUILDLEGACYDEFAULTTOOLSVERSION
    • Ensure the ToolsVersion attribute in the top-level Project element in all your project files is set to the desired ToolsVersion.

    See the Overriding ToolsVersion Settings page on MSDN

    0 讨论(0)
提交回复
热议问题