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
It may be worth adding a -Patch parameter that overrides the current CachePath behavior.
Currently, CachePath is designed to respect and prioritize PackageManagement's package cache over Import-Package's.
However, due to the aforementioned broken packages, it appears to that a -Patch parameter may be warranted.
To implement such an option, all 3 package types need to be addressed.
The easiest is -Path packages. These would simply need to be redirected to a folder other than CachePath
The next easiest is likely the Managed-Object packages. These would need to be cloned from PackageManagement's cache to the new -Patch cache
The most difficult is the standard Managed package. These packages could be sourced out of either cache.
In order to avoid cache conflicts, the -Patch parameter will ignore the existing cache. To accomplish this:
The -Offline flag will throw an error for SemVer2 packages
The -Offline flag will be respected if the package is found in PM's cache
For cached packages provided via -Path, these will need to be cached separately
The -Patch parameter should implement a validateset attribute, where the options are Import and SkipImport. This will allow Import-Package to prep the package without prematurely loading it.
The text was updated successfully, but these errors were encountered:
It appears that it is possible for broken .nupkgs to exist on NuGet:
It may be worth adding a
-Patch
parameter that overrides the current CachePath behavior.Currently, CachePath is designed to respect and prioritize PackageManagement's package cache over Import-Package's.
However, due to the aforementioned broken packages, it appears to that a -Patch parameter may be warranted.
To implement such an option, all 3 package types need to be addressed.
-Path
packages. These would simply need to be redirected to a folder other than CachePath-Patch
cache-Path
, these will need to be cached separatelyThe
-Patch
parameter should implement a validateset attribute, where the options areImport
andSkipImport
. This will allow Import-Package to prep the package without prematurely loading it.The text was updated successfully, but these errors were encountered: