简体   繁体   中英

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

Unable to find fallback package folder '/usr/share/dotnet/sdk/NuGetFallbackFolder'.

And here is the screen shoot: l

Note: My Application has been built by (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

    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.

  4. clean your project.

  5. Build your project.

  6. close the VS and reopen it again.

In my case the above steps fix the problem (both problem Package console and restore packages problem).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM