我正在尝试从 .NET 5 迁移到 .NET 6。我已经安装了 VS 2022 Community Preview 和 Hosting Bundle ...并更新了 NuGet 中的所有内容。该项目将毫无错误地构建,但是当我发布它时,我收到以下错误:
Assets file 'D:\Data\CADE.core\FileManager\FileManager\obj\project.assets.json' doesn't have a target for 'net5.0'.
Ensure that restore has run and that you have included 'net5.0' in the TargetFrameworks for your project.
我不知道为什么它仍在寻找 .NET 5,也不知道如何修复此错误。