Clear fallbackPackageFolders in backend/nuget.config
Fixes: ResolvePackageAssets fails with "Unable to find fallback package folder 'D:\Microsoft Visual Studio\Shared\NuGetPackages'". That folder comes from a machine-wide Visual Studio installer config (C:\Program Files (x86)\NuGet\Config\Microsoft.VisualStudio.FallbackLocation.config), not from anything in this repo — it points at a fallback package cache on whatever drive VS was originally installed on, and NuGet fails outright if that path doesn't exist on the current machine. nuget.config already had <clear/> under packageSources for the same reason (pin restore to nuget.org only); it just didn't do the equivalent for fallbackPackageFolders. Restore and build now depend only on this file, not on machine-specific VS install history.
This commit is contained in:
@@ -4,4 +4,12 @@
|
||||
<clear />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
<!-- Machine-wide VS installs (Microsoft.VisualStudio.FallbackLocation.config)
|
||||
can register a fallback package folder on a drive that doesn't exist on
|
||||
every dev machine (e.g. a D:\ that was only ever present on the machine
|
||||
VS was originally installed on). Clearing it here makes restore/build
|
||||
depend only on nuget.org, regardless of that machine-wide config. -->
|
||||
<fallbackPackageFolders>
|
||||
<clear />
|
||||
</fallbackPackageFolders>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user