所以,我想为我的基于 .NET Core 3 的 C# 项目创建一个安装程序。我为 Visual Studio 2019 安装了安装程序项目扩展,并在我的解决方案中创建了一个新的安装程序项目。在尝试了不同的设置之后,我最终将我的两个可执行文件的 PublishItemsOutputGroup 添加到应用程序文件夹。这(对重复的 dll 抛出各种警告)创建了一个很好的安装程序包,其中包含“据说”所有必需的 dll(有很多 .net 库)。但是,在目标计算机上执行已安装的 exe 文件之一后,我得到:
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '3.0.0' was not found.
- Check application dependencies and target a framework version installed at:
C:\Program Files\dotnet
- Installing .NET Core prerequisites might help resolve this problem:
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
- The following versions are …
Run Code Online (Sandbox Code Playgroud)