You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performing a dotnet tool install %tool_name% --version %version_number% will inject that tool's NuGet package appropriately into the specified globalPackagesFolder path, as well as generate an appropriate file under the global toolResolverCache folder:
However... the PathToExecutable reference inside the file will then never change (per tool version installed). Performing a second dotnet tool install for the same tool/version in a separate similarly setup solution, will leave the PathToExecutable value unchanged (despite the fact the file does appear to be touched). If the original solution is ever removed the tool then breaks across the board and can not be fixed without manually modifying/deleting the file.
Neither dotnet tool restore nor dotnet tool update appear to update the PathToExecutable either, forcing all tools to be installed globally first before ever using a custom nuget.config.
I understand the point of the toolResolverCache is based around consolidating tool installations globally, but if a custom nuget.config is supplied with a solution, it seems like the tool NuGet packages should be referenced in the same manner as any other NuGet Package by the globalPackagesFolder reference first, using the toolResolverCache as a global fallback.
The text was updated successfully, but these errors were encountered:
When using a custom nuget.config that defines globalPackagesFolder along side a .NET 5.0 solution (to provide a local path to restore package to)
Performing a dotnet tool install %tool_name% --version %version_number% will inject that tool's NuGet package appropriately into the specified globalPackagesFolder path, as well as generate an appropriate file under the global toolResolverCache folder:
%userprofile%\.dotnet\toolResolverCache\1\%tool_name%
However... the PathToExecutable reference inside the file will then never change (per tool version installed). Performing a second dotnet tool install for the same tool/version in a separate similarly setup solution, will leave the PathToExecutable value unchanged (despite the fact the file does appear to be touched). If the original solution is ever removed the tool then breaks across the board and can not be fixed without manually modifying/deleting the file.
Neither dotnet tool restore nor dotnet tool update appear to update the PathToExecutable either, forcing all tools to be installed globally first before ever using a custom nuget.config.
I understand the point of the toolResolverCache is based around consolidating tool installations globally, but if a custom nuget.config is supplied with a solution, it seems like the tool NuGet packages should be referenced in the same manner as any other NuGet Package by the globalPackagesFolder reference first, using the toolResolverCache as a global fallback.
The text was updated successfully, but these errors were encountered: