重复' packageReference'找到的项目。删除重复项或使用更新功能来确保稳定的还原行为
我正在使用Microsoft Visual Studio社区2022(64位) - 预览版17.3.0 Preview 1.1。
错误
Severity Code Description Project File Line Suppression State
Error NU1504 Duplicate 'PackageReference' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageReference' items are: StyleCop.Analyzers 1.1.118, StyleCop.Analyzers 1.1.118; Roslynator.Analyzers 3.2.2, Roslynator.Analyzers 3.2.2. Shared.DTOs C:\Users\donhu\source\repos\FSH\src\Shared\Shared.DTOs\Shared.DTOs.csproj 1
错误还原软件包
如何修复它?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
临时解决方案:添加
< nowarn> $(nowarn); nu1504; nu1505; nu1701</nowarn>
,例如旧
结果
:Restore Nuget package现在,
现在 ”>
i.sstatic.net/n2yk5.png“ rel =“ noreferrer 术语解决方案:更新到新版本的Visual Studio 2022(稳定和。或预览更新频道)
相关:
请参见更多
Temporary solution: add
<NoWarn>$(NoWarn);NU1504;NU1505;NU1701</NoWarn>
, for exampleOld
new
result: restore Nuget package success now
Long-term solution: Update to new version of Visual Studio 2022 (Stability and.or Preview update channels)
Related: https://github.com/dotnet/sdk/issues/24747
See more https://github.com/unoplatform/uno.todo/commit/6e442d9b1adb8f990139969413344b135714ed93