升级后无法选择 .NET5 作为 clickOnce 应用程序的先决条件

问题描述 投票:0回答:0

我已经将项目从 .netcore3 升级到 .net5,用于我们使用 clickOnce 部署的应用程序,并希望添加 .Net5 运行时作为先决条件。它没有在滚动视图中列为选项,仅列出了 .NetCore3 和不同框架版本的运行时。 使用 visual Studio 2022.

升级项目:

新项目:

我可以将它打包到应用程序文件夹中,但我宁愿将其链接起来,并且此列表应在升级时更新。

我已经尝试重新启动 Visual Studio,清理并重建解决方案。

有没有办法强制这个列表自己更新?

编辑:

.csproj文件相关部分:

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net5.0-windows</TargetFramework>
    <LangVersion>8.0</LangVersion>
    <UseWPF>true</UseWPF>
    <AssemblyVersion>1.0.48.0</AssemblyVersion>
    <RuntimeIdentifier>win-x86</RuntimeIdentifier>
    <FileVersion>1.0.48.0</FileVersion>
    <PackageIcon>PackageIcon.png</PackageIcon>
    <ApplicationIcon>ApplicationIcon.ico</ApplicationIcon>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <PlatformTarget>x86</PlatformTarget>
  </PropertyGroup>
</Project>
.net-core clickonce visual-studio-2022
© www.soinside.com 2019 - 2024. All rights reserved.