简体   繁体   English

无法在虚拟机中运行的 Visual Studio 2019 中使用 package 管理器控制台

[英]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:这是屏幕截图: l

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:我找到了,我按照以下步骤操作,一切正常:

  1. first of all, you should edit the paths in project.首先,您应该编辑项目中的路径。 assets file to become refers to a new project path.要成为的资产文件是指新的项目路径。

  2. 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) (如果不起作用,请再次运行该命令)

  3. Ensure that you have cleared the Nuget caches.确保您已清除 Nuget 缓存。

  4. clean your project.清理你的项目。

  5. Build your project.构建您的项目。

  6. 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.

相关问题 在 Visual Studio 2019 的包管理器控制台上离线安装 EPPlus 包时出错 - Error while installating EPPlus package offline on package manager console in visual studio 2019 如何在 Visual Studio 外使用包管理器控制台 powershell - How to use Package Manager Console powershell outside visual studio Visual Studio 包管理器控制台的键盘快捷键? - Keyboard Shortcut for the Visual Studio Package Manager Console? Nuget package 管理器在 Visual Studio 2019 版本 16.7 中不起作用 - Nuget package manager not working in visual studio 2019 version 16.7 无法在 Visual Studio 2019 上启动 Tizen Package Manager - Cannot start Tizen Package Manager on Visual Studio 2019 在扩展中以编程方式访问visual studio的powershell控制台(包管理器控制台) - Access the powershell console (package manager console) of visual studio programmatically in an extension 在Visual Studio中的Package Manager控制台上更新多个包 - Update multiple packages on Package Manager Console in Visual Studio 如何在Visual Studio中更改程序包管理器控制台的字体大小 - How to change Font Size of Package Manager Console in Visual Studio 当我打开包管理器控制台时,Visual Studio 2015挂起 - Visual Studio 2015 hangs when I open the Package Manager Console 无法使用 Visual Studio NuGet 包管理器控制台安装包 - Cannot install packages using Visual Studio NuGet Package Manager Console
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM