Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译项目时无法还原NuGet包 #8

Open
xqyi opened this issue Apr 8, 2020 · 3 comments
Open

编译项目时无法还原NuGet包 #8

xqyi opened this issue Apr 8, 2020 · 3 comments

Comments

@xqyi
Copy link

xqyi commented Apr 8, 2020

代码中三个Project在还原NuGet包时均提示:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 NU1202 包 System.CodeDom 4.7.0 与 netcoreapp3.1 (.NETCoreApp,Version=v3.1) 不兼容。 包 System.CodeDom 4.7.0 不支持任何目标框架。 AduSkin C:\Users\xqyi\Desktop\AduSkin-master\src\AduSkin\AduSkin.csproj 1

各项目的编译目标框架为未指定状态,不知何故:
无标题

@aduskin
Copy link
Owner

aduskin commented Apr 8, 2020

需要安装.net Core3.1

@xqyi
Copy link
Author

xqyi commented Apr 9, 2020

无标题
.net core 3.1环境应该是安装好了的,我其他几个项目可正常运行

@John0King
Copy link
Contributor

John0King commented May 23, 2020

@xqyi 目标框架无法选中是因为 这是一个多目标的项目文件,
至于你那个包无法还原, 应该是 nuget 包缓存的版本不正确, 建议你

  • 执行 dotnet clean 或右击解决方案 清理解决方案
  • 执行 dotnet nuget locals all -c 清理nuget缓存 (你之前缓存的几个G的nuget包都会消除)

4.7.0 的包 支持 .net standard 2.0 所以支持 .net core 2.x 和之后的所有.net core 版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants