File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -680,7 +680,7 @@ static void UpdateLibrary(string workingDirectory,
680
680
681
681
// check all packages
682
682
683
- foreach ( var package in packageList )
683
+ foreach ( PackageReference package in packageList )
684
684
{
685
685
// get package name and target version
686
686
string packageName = package . PackageIdentity . Id ;
@@ -692,10 +692,14 @@ static void UpdateLibrary(string workingDirectory,
692
692
string updateResult = "" ;
693
693
string updateParameters ;
694
694
695
- if ( stablePackages && ! packageName . StartsWith ( "UnitsNet." ) )
695
+ if ( ( stablePackages && ! packageName . StartsWith ( "UnitsNet." ) )
696
+ || package . IsDevelopmentDependency )
696
697
{
697
- // don't allow prerelease for release, main branches and UnitsNet packages
698
- // go with our Azure feed
698
+ // don't allow prerelease for:
699
+ // - release
700
+ // - main branches
701
+ // - UnitsNet packages
702
+ // - development dependencies
699
703
updateParameters = $ "{ projectToUpdate } -Id { packageName } { repositoryPath } -FileConflictAction Overwrite";
700
704
}
701
705
else if ( packageName . StartsWith ( "UnitsNet." ) )
You can’t perform that action at this time.
0 commit comments