![](/img/trans.png)
[英]Compile a Visual Studio C# project for two TargetPlatformVersion
[英]Visual Studio - Windows UI Library - set TargetPlatformMinVersion and TargetPlatformVersion (C#)
我想在 Visual Studio 中嘗試 Windows UI 庫。 我已按照 Microsoft 的安裝說明進行操作(鏈接: https://docs.microsoft.com/en-us/windows/apps/winui/winui2/getting-started )。 不幸的是,我找不到可以設置“TargetPlatformMinVersion”和“TargetPlatformVersion”的地方。
我找到了這張圖片,但我找不到這些設置。
如果我跳過這一步,很遺憾會收到一條錯誤消息。
非常感謝
第一種方法:
請按照如何更改 TargetplatformVersion 的說明進行操作:
1) 在 Visual Studio 中右鍵單擊您的項目
2) Select “Unload Project“
,現在將顯示為項目名稱(unavailable)
3) 右鍵點擊卸載的項目 select “Edit projectName.csproj”
4) 在第一個<PropertyGroup>
中找到<TargetPlatformVersion>
和<TargetPlatformMinVersion>
項。
5) 將TargetPlatformMinVersion
更改為您想要的版本。
6)現在保存並關閉文件
7)Select“加載項目”再次啟動項目。
第二種方法:
1) 在 Visual Studio 中關閉您的項目
2)用記事本或記事本++打開你的projectName.csproj
4) 在第一個<PropertyGroup>
中找到<TargetPlatformVersion>
和<TargetPlatformMinVersion>
項。
5) 將TargetPlatformMinVersion
更改為您想要的版本。
6)現在保存並關閉文件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.