File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -803,7 +803,12 @@ private Hashtable BeginPackageInstall(
803
803
pkgToInstall . RepositorySourceLocation = repository . Uri . ToString ( ) ;
804
804
pkgToInstall . AdditionalMetadata . TryGetValue ( "NormalizedVersion" , out string pkgVersion ) ;
805
805
if ( pkgVersion == null ) {
806
+ // Not all NuGet providers (e.g. Artifactory, possibly others) send NormalizedVersion in NuGet package responses.
807
+ // If they don't, we need to manually construct the combined version+prerelease from pkgToInstall.Version and the prerelease string.
806
808
pkgVersion = pkgToInstall . Version . ToString ( ) ;
809
+ if ( ! String . IsNullOrEmpty ( pkgToInstall . Prerelease ) ) {
810
+ pkgVersion += $ "-{ pkgToInstall . Prerelease } ";
811
+ }
807
812
}
808
813
// Check to see if the pkg is already installed (ie the pkg is installed and the version satisfies the version range provided via param)
809
814
if ( ! _reinstall )
You can’t perform that action at this time.
0 commit comments