From 7fffc939cfdc49a0d3599a3d4891abc4840daffd Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 27 Mar 2018 09:03:44 -0700 Subject: [PATCH] Backport: consolidate list of myget feeds to one place and remove the need to mirror packages --- NuGet.config | 2 +- build/PackageArchive.targets | 4 +- build/RuntimeStore.targets | 13 +- build/dependencies.props | 702 +++++++++--------- build/push.targets | 1 - build/repo.props | 1 + build/repo.targets | 22 +- build/sources.props | 24 + build/tasks/CopyPackagesToSplitFolders.cs | 3 - build/tasks/RepoTasks.csproj | 1 + build/tasks/Utilities/PackageCategory.cs | 1 - build/tasks/Utilities/PackageCollection.cs | 3 - .../dotnet-deb-tool-consumer.csproj | 3 +- build/tools/templates/Archive/Archive.csproj | 13 +- .../HostingStartup/HostingStartup.csproj | 10 +- .../templates/RS.Manifest/RS.Manifest.csproj | 12 +- .../RS.References/RS.References.csproj | 10 +- src/Directory.Build.props | 1 + .../Microsoft.AspNetCore.All.csproj | 9 - 19 files changed, 382 insertions(+), 453 deletions(-) create mode 100644 build/sources.props diff --git a/NuGet.config b/NuGet.config index 7604d0051e..e32bddfd51 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,6 +2,6 @@ - + diff --git a/build/PackageArchive.targets b/build/PackageArchive.targets index b938f13938..6cf6f3ad83 100644 --- a/build/PackageArchive.targets +++ b/build/PackageArchive.targets @@ -57,7 +57,7 @@ <_FallbackArchiveRestoreSources Include="$(MetapackageRestoreSource)" Condition="Exists($(MetapackageRestoreSource))" /> - <_FallbackArchiveRestoreSources Include="$(_DependencyMirrorDirectory)" Condition="Exists($(_DependencyMirrorDirectory))" /> + <_FallbackArchiveRestoreSources Include="$(RestoreSources)" /> + Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(LZMAMicrosoftNETCoreApp20PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" /> diff --git a/build/RuntimeStore.targets b/build/RuntimeStore.targets index 9592fc5be5..9a0a5732ce 100644 --- a/build/RuntimeStore.targets +++ b/build/RuntimeStore.targets @@ -3,7 +3,6 @@ <_DependencyBuildDirectory>$(RepositoryRoot).deps\build\ - <_DependencyMirrorDirectory>$(RepositoryRoot).deps\mirror\ <_BuildScriptsDirectory>$(MSBuildThisFileDirectory)tools\scripts\ <_WorkRoot>$(RepositoryRoot).w\ <_RuntimeStoreWorkDirectory>$(_WorkRoot).rw\ @@ -49,12 +48,12 @@ + Properties="Configuration=$(Configuration);BuildNumber=$(BuildNumber);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true;_Target=Restore" /> + Properties="Configuration=$(Configuration);BuildNumber=$(BuildNumber);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" /> @@ -86,12 +85,12 @@ + Properties="Configuration=$(Configuration);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath);DotNetBuildOffline=true;_Target=Restore" /> + Properties="Configuration=$(Configuration);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath);DotNetBuildOffline=true" /> @@ -103,8 +102,8 @@ + <_RuntimeStoreRestoreSources Include="$(RestoreSources)" /> <_RuntimeStoreRestoreSources Include="$(_DependencyBuildDirectory)" Condition="Exists($(_DependencyBuildDirectory))" /> - <_RuntimeStoreRestoreSources Include="$(_DependencyMirrorDirectory)" Condition="Exists($(_DependencyMirrorDirectory))" /> <_RuntimeStoreRestoreSources Include="$(BuildDir)" Condition="Exists($(BuildDir))" /> @@ -114,6 +113,7 @@ <_RsManifestProps>MicrosoftAspNetCoreAllPackageVersion=$(PackageVersion) + <_RsManifestProps>$(_RsManifestProps);DotNetBuildOffline=true <_RsManifestProps>$(_RsManifestProps);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath) @@ -153,6 +153,7 @@ $(_WorkRoot)HostingStartup\ <_HostingStartupProps>DepsOutputPath=$(_DepsOutputDirectory) <_HostingStartupProps>$(_HostingStartupProps);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcePropsPath) + <_HostingStartupProps>$(_HostingStartupProps);DotNetBuildOffline=true <_HostingStartupProps>$(_HostingStartupProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp20PackageVersion) <_HostingStartupProps>$(_HostingStartupProps);HostingStartupPackageName=$(HostingStartupPackageName) <_HostingStartupProps>$(_HostingStartupProps);HostingStartupPackageVersion=$(HostingStartupPackageVersion) diff --git a/build/dependencies.props b/build/dependencies.props index eb3977bc8c..eab6ee52e0 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -4,14 +4,10 @@ - - false - - false false @@ -33,281 +29,258 @@ - - https://dotnet.myget.org/F/dotnet-core/api/v3/index.json - - - + - - - https://api.nuget.org/v3/index.json - $(DotNetCorePatchFeed);$(DotNetCoreFeed) - - - - + + KRB2004 RuntimeFrameworkVersion netcoreapp2.0 - + KRB2004 MicrosoftNETCoreApp20PackageVersion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - https://dotnet.myget.org/F/roslyn/api/v3/index.json 2.6.0-beta1-61924-08 - + KRB2004 MicrosoftCodeAnalysisToolingPackageVersion - + KRB2004 MicrosoftCodeAnalysisCommonToolingPackageVersion - + KRB2004 MicrosoftCodeAnalysisCSharpToolingPackageVersion - + KRB2004 MicrosoftCodeAnalysisCSharpWorkspacesToolingPackageVersion - + KRB2004 MicrosoftCodeAnalysisVisualBasicToolingPackageVersion - + KRB2004 MicrosoftCodeAnalysisVisualBasicWorkspacesToolingPackageVersion - + KRB2004 MicrosoftCodeAnalysisWorkspacesCommonToolingPackageVersion - - - - - + + + + + - - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json $(KoreBuildVersion) $(KoreBuildVersion) - - + + - - - https://dotnet.myget.org/F/aspnetcoremodule/api/v3/index.json - - - + - - - https://api.nuget.org/v3/index.json - - - - - - + + + + KRB2004 RuntimeFrameworkVersion netcoreapp1.0 - + KRB2004 MicrosoftNETCoreApp10PackageVersion - + KRB2004 RuntimeFrameworkVersion netcoreapp1.1 - + KRB2004 MicrosoftNETCoreApp11PackageVersion - + KRB2004 DotNetCliTool_MicrosoftNETCoreApp20PackageVersion netcoreapp2.0 - - - - - - - - - - - - - + + + + + + + + + + + + + KRB2004 - + KRB2004 - + KRB2004 - + KRB2004 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + NETStandardLibrary20PackageVersion - - + + KRB2004 NewtonsoftJsonToolingPackageVersion - + KRB2004 NewtonsoftJsonRuntimePackageVersion - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KRB2004 XunitAssertStablePackageVersion - + KRB2004 - - + + XunitRunnerVisualStudioPackageVersion - + KRB2004 XunitStablePackageVersion - + KRB2004 @@ -321,218 +294,215 @@ not building again in this patch. --> - - https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/build/push.targets b/build/push.targets index d52845fc48..ecdc891050 100644 --- a/build/push.targets +++ b/build/push.targets @@ -3,7 +3,6 @@ - diff --git a/build/repo.props b/build/repo.props index 33c3c4f56f..b6984598fb 100644 --- a/build/repo.props +++ b/build/repo.props @@ -13,6 +13,7 @@ FeedCredential="$(DotNetAssetRootAccessTokenSuffix)" /> + diff --git a/build/repo.targets b/build/repo.targets index 3817e3c130..8b6e77531f 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -13,17 +13,13 @@ <_RepositoryBuildTargets Condition="'$(_RepositoryBuildTargets)'=='' AND '$(CompileOnly)'=='true'">/t:Package /t:VerifyPackages <_RepositoryBuildTargets Condition="'$(_RepositoryBuildTargets)'==''">/t:Verify - - $(IntermediateDir)mirror\ - - $(IntermediateDir)ext\ $(IntermediateDir)dependencies.g.props $(IntermediateDir)sources.g.props $(IntermediateDir)branding.g.props $(PrepareDependsOn);VerifyPackageArtifactConfig;PrepareOutputPath $(CleanDependsOn);CleanArtifacts;CleanUniverseArtifacts - $(RestoreDependsOn);InstallDotNet;RestoreExternalDependencies + $(RestoreDependsOn);InstallDotNet $(CompileDependsOn);BuildRepositories $(PackageDependsOn);BuildTemplates;SplitPackages $(VerifyDependsOn);VerifyCoherentVersions @@ -33,16 +29,6 @@ - - - - - - <_LineupPackages Include="@(ExternalDependency)" /> @@ -52,7 +38,7 @@ <_LineupSources Include="$(_DependencyPackagesDirectory)" Condition="'$(_DependencyPackagesDirectory)' != '' AND Exists('$(_DependencyPackagesDirectory)')" /> <_LineupSources Include="$(BuildDir)" /> <_LineupSources Include="$(IntermediateExternalPackageDir)" /> - <_LineupSources Include="$(IntermediateMirrorPackageDir)" /> + <_LineupSources Include="$(RestoreSources)" /> - - <_MirroredPackageFiles Include="$(IntermediateMirrorPackageDir)*.nupkg" /> diff --git a/build/sources.props b/build/sources.props new file mode 100644 index 0000000000..0cdb57fc43 --- /dev/null +++ b/build/sources.props @@ -0,0 +1,24 @@ + + + + + + + $(DotNetAdditionalRestoreSources); + $(DotNetRestoreSources); + $(DotNetCorePatchFeed); + + + $(RestoreSources); + https://api.nuget.org/v3/index.json; + + + $(RestoreSources); + https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json; + https://dotnet.myget.org/F/roslyn/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcoremodule/api/v3/index.jsonl + + + diff --git a/build/tasks/CopyPackagesToSplitFolders.cs b/build/tasks/CopyPackagesToSplitFolders.cs index b9ead3f5b6..22f2f24df4 100644 --- a/build/tasks/CopyPackagesToSplitFolders.cs +++ b/build/tasks/CopyPackagesToSplitFolders.cs @@ -76,9 +76,6 @@ namespace RepoTasks case PackageCategory.ShipOob: destDir = Path.Combine(DestinationFolder, "shipoob"); break; - case PackageCategory.Mirror: - destDir = Path.Combine(DestinationFolder, "mirror"); - break; case PackageCategory.Symbols: destDir = Path.Combine(DestinationFolder, "symbols"); break; diff --git a/build/tasks/RepoTasks.csproj b/build/tasks/RepoTasks.csproj index a52ecec4f4..2c77aa56c2 100644 --- a/build/tasks/RepoTasks.csproj +++ b/build/tasks/RepoTasks.csproj @@ -1,5 +1,6 @@ + netstandard2.0 diff --git a/build/tasks/Utilities/PackageCategory.cs b/build/tasks/Utilities/PackageCategory.cs index 78afe9cbce..19a871d3b6 100644 --- a/build/tasks/Utilities/PackageCategory.cs +++ b/build/tasks/Utilities/PackageCategory.cs @@ -10,7 +10,6 @@ namespace RepoTasks.Utilities Shipping, NoShip, ShipOob, - Mirror, Symbols, } } diff --git a/build/tasks/Utilities/PackageCollection.cs b/build/tasks/Utilities/PackageCollection.cs index d066360f53..4aa778aa2a 100644 --- a/build/tasks/Utilities/PackageCollection.cs +++ b/build/tasks/Utilities/PackageCollection.cs @@ -47,9 +47,6 @@ namespace RepoTasks.Utilities case "shipoob": category = PackageCategory.ShipOob; break; - case "mirror": - category = PackageCategory.Mirror; - break; default: category = PackageCategory.Unknown; break; diff --git a/build/tools/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj b/build/tools/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj index 659448ee0e..27280799d4 100644 --- a/build/tools/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj +++ b/build/tools/dotnet-deb-tool-consumer/dotnet-deb-tool-consumer.csproj @@ -1,8 +1,9 @@  + + netcoreapp1.0 - $(RestoreSources);https://dotnet.myget.org/F/cli-deps/api/v3/index.json diff --git a/build/tools/templates/Archive/Archive.csproj b/build/tools/templates/Archive/Archive.csproj index eb51e5dbd4..55c75739b1 100644 --- a/build/tools/templates/Archive/Archive.csproj +++ b/build/tools/templates/Archive/Archive.csproj @@ -8,18 +8,7 @@ true true netcoreapp2.0 - $(DotNetRestoreSources) - $(RestoreSources);https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; - - $(RestoreSources); - https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - + $(RestoreSources);$(DotNetRestoreSources); diff --git a/build/tools/templates/HostingStartup/HostingStartup.csproj b/build/tools/templates/HostingStartup/HostingStartup.csproj index 12cdf93eb1..0eb0b5357d 100644 --- a/build/tools/templates/HostingStartup/HostingStartup.csproj +++ b/build/tools/templates/HostingStartup/HostingStartup.csproj @@ -5,15 +5,7 @@ netcoreapp2.0 Exe - $(DotNetRestoreSources) - - $(RestoreSources); - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - + $(RestoreSources);$(DotNetRestoreSources); diff --git a/build/tools/templates/RS.Manifest/RS.Manifest.csproj b/build/tools/templates/RS.Manifest/RS.Manifest.csproj index 7d1d0f66ab..bca7710a0f 100644 --- a/build/tools/templates/RS.Manifest/RS.Manifest.csproj +++ b/build/tools/templates/RS.Manifest/RS.Manifest.csproj @@ -4,17 +4,7 @@ netcoreapp2.0 - $(DotNetRestoreSources) - - $(RestoreSources); - https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json; - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - + $(RestoreSources);$(DotNetRestoreSources); diff --git a/build/tools/templates/RS.References/RS.References.csproj b/build/tools/templates/RS.References/RS.References.csproj index bcbed2fd57..580c568b51 100644 --- a/build/tools/templates/RS.References/RS.References.csproj +++ b/build/tools/templates/RS.References/RS.References.csproj @@ -3,15 +3,7 @@ - $(DotNetRestoreSources) - - $(RestoreSources); - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - + $(RestoreSources);$(DotNetRestoreSources); netcoreapp2.0 false false diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 7d57abfc71..6a9feb52e1 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,4 +1,5 @@ + diff --git a/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj b/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj index c3d5b59912..0f4826956f 100644 --- a/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj +++ b/src/Microsoft.AspNetCore.All/Microsoft.AspNetCore.All.csproj @@ -4,15 +4,6 @@ $(DotNetRestoreSources) - - $(RestoreSources); - https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; - - - $(RestoreSources); - https://api.nuget.org/v3/index.json; - - false false netcoreapp2.0