File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -924,6 +924,18 @@ private void DownloadMissingPackages(List<FileInfo> allFiles, ISet<string> dllPa
924924 return ;
925925 }
926926
927+ var multipleVersions = notYetDownloadedPackages
928+ . GroupBy ( p => p . Name )
929+ . Where ( g => g . Count ( ) > 1 )
930+ . Select ( g => g . Key )
931+ . ToList ( ) ;
932+
933+ foreach ( var package in multipleVersions )
934+ {
935+ logger . LogWarning ( $ "Found multiple not yet restored packages with name '{ package } '.") ;
936+ notYetDownloadedPackages . Remove ( new ( package , PackageReferenceSource . PackagesConfig ) ) ;
937+ }
938+
927939 logger . LogInfo ( $ "Found { notYetDownloadedPackages . Count } packages that are not yet restored") ;
928940
929941 var nugetConfigs = allFiles . SelectFileNamesByName ( "nuget.config" ) . ToArray ( ) ;
You can’t perform that action at this time.
0 commit comments