I. Modification of project documents
In Visual Studio , in Solution Explorer, open the shortcut menu for the project, and then choose Unload Project. This will unload the project file (. vcxproj) for your project.
On the menu bar, choose File,Open,file. in the Open File dialog box, navigate to the project folder, and then open the project file (. vcxproj).
In the project file, locate the entry for the target Framework version.For example, if your project is designed to use the. NET Framework 4.5, <propertygroup label= "Globals" > elements found in the <targetframeworkversion>v4.5</ The targetframeworkversion> element, if the <TargetFrameworkVersion> element does not exist, is added, and the corresponding version number is modified.
Second, modify the. props file to match the toolset to the. NET Framework
Another thing I learned on the the the-on-the-the-you cannot mix values of andPlatform ToolsetTarget Framework Version.
The possible combinations I found where:
. NET 3.5 or less:
Platform Toolset: V90, which'll useVisual Studio 2008runtime binaries,
TargetFrameworkVersion: v3.5 (or less),
The preprocessor can have_WIN32_WINNTdefined (e.g._WIN32_WINNT=0x0500)
. NET 4.0 or higher:
Platform Toolset: v100, which'll useVisual Studio 2010runtime binaries,
TargetFrameworkVersion: v4.0 (or higher),
The preprocessor must not has the ' _win32_winnt=0x0500 ' defined
See:
1.https://msdn.microsoft.com/zh-cn/library/ff770576.aspx
2.http://stackoverflow.com/questions/18571546/clr-cli-linker-fails-with-error-lnk2022-custom-attributes-are-not-consistent
How Visual Studio modifies the. NET Framework framework version of a C + + project