Visual Studio - Windows UI 库 - 设置 TargetPlatformMinVersion 和 TargetPlatformVersion (C#) [英] Visual Studio - Windows UI Library - set TargetPlatformMinVersion and TargetPlatformVersion (C#)
问题描述
我想在 Visual Studio 中尝试 Windows UI 库.我已按照 Microsoft 的安装说明进行操作(链接:
如果我跳过这一步,我很遗憾会收到一条错误消息.
非常感谢
第一种方法:
请按照如何更改 TargetplatformVersion 的说明进行操作:
1) 在 Visual Studio 中右键单击您的项目
2) 选择Unload Project"
,它现在会显示为ProjectName (unavailable)
3) 右键单击卸载的项目并选择Edit projectName.csproj"
4) 在第一个
中找到
和
项.
5) 将 TargetPlatformMinVersion
更改为您想要的版本.
6) 现在保存并关闭文件
7) 选择Load Project"再次启动项目.
第二种方法:
1) 在 Visual Studio 中关闭您的项目
2) 使用记事本或记事本++
打开您的projectName.csproj
4) 在第一个
中找到
和
项.
5) 将 TargetPlatformMinVersion
更改为您想要的版本.
6) 现在保存并关闭文件
I would like to try the Windows UI Library in Visual Studio. I have followed the installation instructions from Microsoft (Link: https://docs.microsoft.com/en-us/windows/apps/winui/winui2/getting-started). Unfortunately I can't find the place where I can set the "TargetPlatformMinVersion" and the "TargetPlatformVersion".
I found this picture, but I cannot find these settings.
If I skip this step, I unfortunately get an error message.
Thanks a lot
First Approach:
Please follow the instruction of how to change TargetplatformVersion:
1) Right-click on your project in Visual Studio
2) Select "Unload Project"
, it will now appear as ProjectName (unavailable)
3) Right-click on the unloaded project and select "Edit projectName.csproj"
4) Locate the <TargetPlatformVersion>
and <TargetPlatformMinVersion>
items in the first <PropertyGroup>
.
5) Change the TargetPlatformMinVersion
to the version that you want.
6) Now Save and Close the file
7) Select the "Load Project" to Launch the project again.
Second Approach:
1) Close Your project in visual studio
2) Open Your projectName.csproj
with Notepad or Notepad++
4) Locate the <TargetPlatformVersion>
and <TargetPlatformMinVersion>
items in the first <PropertyGroup>
.
5) Change the TargetPlatformMinVersion
to the version that you want.
6) Now Save and Close the file
这篇关于Visual Studio - Windows UI 库 - 设置 TargetPlatformMinVersion 和 TargetPlatformVersion (C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!