- Open the Package Manager UI - Right-click on References and select Manage NuGet Packages...
- Open the Package Manager Console - From Tools > NuGet Package Manager, select Package Manager Console
- Run NuGet restore - Right-click on the solution node in the Solution Explorer and select Restore NuGet Packages
- Build the project which also triggers NuGet restore
Must use PackageReference 解決辦法
Must use PackageReference
這是因爲 .net framework的項目 在nuget時,引用到了 .net core 下的包。
解決辦法,把之前引用的相關包全部在nuget上刪除,然後,在工具-選項-NuGet 包管理器裏找到默認包管理格式:選擇PackageReference。這是如果引用少的情況可以這樣,如果引用多了,可以這樣操作。
Perform any one of the following NuGet actions:
You should now be able to see the migration option. Note that this option is not supported and will not show up for ASP.NET and C++ project types.
工具-選項-NuGet 包管理器裏找到默認包管理格式:選擇PackageReference
然後右擊解決方案,點擊 【還原 Nuget包】
這個解決辦法只對visual studio 2017以上的纔行,2017以下的沒這個選項
更深入瞭解還得官網:
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.