[英]Unable to use package manager console in visual studio 2019 that running inside Virtual Machine
I'm trying to run my .NET Core 3.1 Applications by Windows Virtual Machine with new Visual studio 2019 IDE (my Applications not created in this Virtual Machine) but I encountered two problems first one is: VS couldn't restore all solution packages, second one is: So when I wan't to try to solve this problem by some commands using Package Manager console I encountered below problem我正在尝试运行我的 .NET Core 3.1 Applications by Windows 虚拟机与新的 Visual Studio 2019 IDE (我的应用程序不是在此 VS 虚拟机中创建的第一个解决方案包)一个是:所以当我不想尝试通过使用 Package 管理器控制台的一些命令来解决这个问题时,我遇到了以下问题
Unable to find fallback package folder '/usr/share/dotnet/sdk/NuGetFallbackFolder'.找不到后备 package 文件夹“/usr/share/dotnet/sdk/NuGetFallbackFolder”。
And here is the screen shoot:这是屏幕截图:
Note: My Application has been built by (Asp.net core Boilerplate framework)注意:我的应用程序是由(Asp.net core Boilerplate framework)构建的
I found it, I followed below steps and everything worked fine:我找到了,我按照以下步骤操作,一切正常:
first of all, you should edit the paths in project.首先,您应该编辑项目中的路径。 assets file to become refers to a new project path.要成为的资产文件是指新的项目路径。
Open Power Shell for the same directory that.sln file exist then run below command打开 Power Shell 为存在 .sln 文件的同一目录,然后运行以下命令
PS E:\WorkSpace\VMTEST\5.5.0\aspnet-core\src\VMTEST.Web.Core\obj>dotnet restore VMTEST.sln
(if won't work, run the command again) (如果不起作用,请再次运行该命令)
Ensure that you have cleared the Nuget caches.确保您已清除 Nuget 缓存。
clean your project.清理你的项目。
Build your project.构建您的项目。
close the VS and reopen it again.关闭VS并重新打开它。
In my case the above steps fix the problem (both problem Package console and restore packages problem).在我的情况下,上述步骤解决了问题(问题 Package 控制台和恢复包问题)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.