How Visual Studio modifies the. NET Framework framework version of a C + + project

Source: Internet
Author: User



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





Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.