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
{{ message }}
Repository navigation
Provide a mechanism to get root of the restore folder of the resolved nuget package #4174
Activity
ramarag commentedon Dec 31, 2016
cc @emgarten
emgarten commentedon Dec 31, 2016
packageDir = pkginfo.PathResolver.GetInstallPath(packageId, version);will give you the root of the package folder.Example:
Paths in the lock file are relative to the install path, you should combine based on that. In your case you already have it as
packageDirramarag commentedon Dec 31, 2016
@emgarten i need the cache Root not packagDir
In the above example it translates to the nuget cache root directory
GetVersionListPath("") -> C:\users\user\.nuget\packagesemgarten commentedon Dec 31, 2016
There isn't a helper method for that currently, is this code copying all of the packages from each folder, or what will this do?
The safest way to get the root for all packages would be to:
Ordering by length would protect against any nested folder scenarios
Add RootPath and IsLowerCase properties to VersionFolderPathResolver
Add RootPath and IsLowerCase properties to VersionFolderPathResolver
schellap commentedon Jan 9, 2017
Cc @gkhanna79
emgarten commentedon Jan 9, 2017
I've checked in a fix to make the Root property public on the VersoinFolderPathResolver.