日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > c/c++ >内容正文

c/c++

visual studio如何修改c++项目的.net framework框架版本

發(fā)布時間:2023/12/4 c/c++ 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 visual studio如何修改c++项目的.net framework框架版本 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

一、 修改項目文件

  • 在 Visual Studio 的“解決方案資源管理器”中,打開項目的快捷菜單,然后選擇“卸載項目”。?這將為你的項目卸載項目文件 (.vcxproj)。

  • 在菜單欄上,依次選擇“文件”、“打開”、“文件”。?“打開文件”對話框中,導(dǎo)航到項目文件夾,然后打開項目文件 (.vcxproj)。

  • 在項目文件中,找到目標(biāo) Framework 版本的條目。?例如,如果你的項目設(shè)計為使用 .NET Framework 4.5,?<PropertyGroup?Label="Globals">元素中找到?請在<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>?元素,?如果?<TargetFrameworkVersion>?元素不存在,則新增之,并修改相應(yīng)版本號。

  • ?二、修改.props文件,使工具集與.net框架匹配

    Another thing I learned on the way is that?you cannot mix values?of?Platform Toolset?and?Target Framework Version.

    The possible combinations I found where:

    .NET 3.5 or less:

    • Platform Toolset:?v90, which will use?Visual Studio 2008?runtime binaries,
    • TargetFrameworkVersion:?v3.5?(or less),
    • In the preprocessor you can have?_WIN32_WINNT?defined (e.g.?_WIN32_WINNT=0x0500)

    .NET 4.0 or higher:

    • Platform Toolset:?v100, which will use?Visual Studio 2010?runtime binaries,
    • TargetFrameworkVersion:?v4.0?(or higher),
    • In the preprocessor you?must not?have the '_WIN32_WINNT=0x0500' defined

    ?

    ?

    參見:

    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

    轉(zhuǎn)載于:https://www.cnblogs.com/erentec/p/4886083.html

    總結(jié)

    以上是生活随笔為你收集整理的visual studio如何修改c++项目的.net framework框架版本的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。