所有需要Net6.0的Nuget软件包与Net6.0不兼容。即使完成Windows重置
启动PC后,我尝试继续使用以前从事的项目: ASP.NET MVC Core 6.0。
突然之间,Microsoft.EntityFrameWorkCore未安装在解决方案中。 尝试重新安装Microsoft.entityFrameworkCore Nuget软件包后,我收到了以下错误:
Package restore failed. Rolling back package changes for 'BulkyBook' (my project)
NU1202: Package Microsoft.Extensions.Logging 6.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.Extensions.Logging 6.0.0 does not support any target frameworks.
NU1202: Package Microsoft.Extensions.Options 6.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.Extensions.Options 6.0.0 does not support any target frameworks.
...对于所有依赖关系以及
NU1202: Package Microsoft.EntityFrameworkCore 6.0.5 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.EntityFrameworkCore 6.0.0 does not support any target frameworks.
尝试安装任何需要Net6.0的Nuget软件包时,我会遇到相同的问题。
我已经重置了Windows(保留文件,但失去所有程序),并且完全重新安装了Visual Studio 2022.我仍然存在相同的问题。
这杀死了我,我愿意尝试任何事情。 证明图像:
After booting up my PC I tried to continue using a previous project I had been working on:
ASP.NET MVC Core 6.0.
All of a sudden Microsoft.EntityFrameworkCore was not installed in the solution.
After trying to reinstall the Microsoft.EntityFrameworkCore nuget package I received the following errors:
Package restore failed. Rolling back package changes for 'BulkyBook' (my project)
NU1202: Package Microsoft.Extensions.Logging 6.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.Extensions.Logging 6.0.0 does not support any target frameworks.
NU1202: Package Microsoft.Extensions.Options 6.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.Extensions.Options 6.0.0 does not support any target frameworks.
... for all dependencies AND
NU1202: Package Microsoft.EntityFrameworkCore 6.0.5 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Microsoft.EntityFrameworkCore 6.0.0 does not support any target frameworks.
When trying to install ANY nuget packages requiring net6.0 I get the same issue.
I have done a reset of Windows (keeping files but losing all programs) and fully reinstalled Visual Studio 2022.I still have the same issue.
This is killing me, I'm willing to try anything.
Image for proof:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的项目文件很可能指定< targetFramework> net6.0</targetFramework>。将其更改为< targetFramework> net6.0-windows</targetFramework>然后重试。
您也可能会感兴趣的是,如果< usewindowsforms> true</usewindowsforms>已指定并LT; outputType>不存在,您有一个具有Winforms依赖性的类库。
Quite possibly, your Project file specifies <TargetFramework>net6.0</TargetFramework>. Change this to <TargetFramework>net6.0-windows</TargetFramework> and try again.
It might also interest you to know that if <UseWindowsForms>true</UseWindowsForms> has been specified and <OutputType> is absent, you have a class Library with WinForms dependencies.