Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could I remove or move the folder NuGetFallbackFolder?

Tags:

.net-core

Could I remove the folder C:\Program Files\dotnet\sdk\NuGetFallbackFolder\ or move it to other folder? (better not in disk C)

If could remove, how to remove? delete the folder directly? any side effects or damages?

If could move, how to move? target folder like D:\NuGetFallbackFolder? How can I do it?

like image 530
David Smith Avatar asked Jul 24 '18 08:07

David Smith


People also ask

Can I delete .NuGet Packages folder?

Yes, the . nuget folder is used as a cache for packages downloaded to speed up project restore and compilation. It can safely be removed.

What is the NuGetFallbackFolder?

NuGetFallbackFolder stores a cache of NuGet packages used by an SDK during the restore operation, such as when running dotnet restore or dotnet build . This folder is only used prior to . NET Core 3.0. It can't be built from source, because it contains prebuilt binary assets from nuget.org.

Where are Nugets stored?

The global-packages folder is where NuGet installs any downloaded package. Each package is fully expanded into a subfolder that matches the package identifier and version number. Projects using the PackageReference format always use packages directly from this folder. When using the packages.

What does clear all NuGet caches do?

The above process will clear all the NuGet packages from cache location. So once cleared the NuGet cache location then every NuGet package will be downloaded/restored from source location to cache location again.


2 Answers

This folder contains a set of Nuget packages that the SDK expects to use. It's used as a nuget source whenever dotnet is trying to resolve nuget packages. Removing is generally similar to removing your nuget cache: .NET Core will simply not find the packages and download them into the (normal, non-NuGetFallbackFolder) local nuget cache.

Some distributions of .NET Core do not contain the NuGetFallbackFolder. The only consequence is that dotnet will download all those packages as soon as it needs them (possibly on the first SDK command).

If you move it around, .NET Core won't know about the new location and just treat it as if you had deleted the directory. On Linux, I would use a symlink to point from the old location to the new one. I don't know if Windows supports that.

like image 57
omajid Avatar answered Sep 23 '22 17:09

omajid


after searching the internet and trying some in vain: deleting the NuGetFallbackFolder in the corresponding .NET SDK and repairing in Windows Uninstall Programm helps really in my case it worked : the build process in solution got all new in

like image 35
Henri Avatar answered Sep 23 '22 17:09

Henri