I need to install Nuget Package ProductionStackTrace, so I use the following command
PM> Install-Package ProductionStackTrace
But when I execute this command I get the following error
The source at Microsoft Visual Studio Offline Packages [C:\Program Files (x86)\Microsoft SDKs\NuGetPackages] is unreachable.
I checked the path and yes the package is not there; isn't Nuget Package added by default? If not, from where I can add it?
Visual Studio provides some common packages for us to use in the Microsoft SDKs\NuGetPackages folder when our computer doesn't have network.
The C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\ folder is not means that the cache for the packages has been installed before from internet. So the package ProductionStackTrace will not add into this folder.
If you want to use this package without network, you need to download it when you have network. You can download it from the nuget.org.
Certainly, you can also add this package in to the Microsoft SDKs\NuGetPackages so that you can use it when you do not have a network. The add command line is:
nuget add <packagePath> -source <sourcePath> [options]
You can refer to the nuget Add reference for detail.
Hope this can help you.
for Visual Studio Mac, packages are copied into the path /Users/{username}/.nuget/packages
You can choose menu for Visual Studio->Preferences->Nuget->Sources and add a new source using this path and install already cached packages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With