From e7f4fb001bebd38954cac94f75c81f9ec285ce2d Mon Sep 17 00:00:00 2001 From: John Beisner Date: Tue, 28 Nov 2017 12:54:32 -0800 Subject: [PATCH] Writing a NuGet.config as part of the preparatory steps. --- NuGet.Config | 20 ------------ build.proj | 6 ++-- build/InitRepo.props | 2 ++ build/InitRepo.targets | 3 +- build/NugetConfigFile.targets | 58 +++++++++++++++++++++++++++++++++++ run-build.ps1 | 2 +- 6 files changed, 67 insertions(+), 24 deletions(-) delete mode 100644 NuGet.Config create mode 100644 build/NugetConfigFile.targets diff --git a/NuGet.Config b/NuGet.Config deleted file mode 100644 index f2f0337f6..000000000 --- a/NuGet.Config +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/build.proj b/build.proj index bac606d59..85de07477 100644 --- a/build.proj +++ b/build.proj @@ -29,10 +29,11 @@ - + + Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)" + DependsOnTargets="WriteNugetConfigFile"> $(ExtraRestoreArgs) /p:GeneratePropsFile=$(GeneratePropsFile) @@ -48,6 +49,7 @@ + diff --git a/build/InitRepo.props b/build/InitRepo.props index 3a17534a9..e5ce81287 100644 --- a/build/InitRepo.props +++ b/build/InitRepo.props @@ -4,5 +4,7 @@ $(GeneratedPropsDir)/GitCommitInfo.props $(GeneratedPropsDir)/HostInfo.props $(GeneratedPropsDir)/BuildInfo.props + $(GeneratedPropsDir)/BuildInfo.props + $(RepoRoot)/NuGet.Config diff --git a/build/InitRepo.targets b/build/InitRepo.targets index be227551e..078923dec 100644 --- a/build/InitRepo.targets +++ b/build/InitRepo.targets @@ -1,6 +1,7 @@ + + + + + <?xml version="1.0" encoding="utf-8"?> + <configuration> + <packageSources> + <!--To inherit the global NuGet package sources remove the <clear/> line below --> + <clear /> + + + + <add key="PrivateBlobFeed" value="$(ExternalRestoreSources)" /> + + + + <add key="BlobFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" /> + <add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" /> + <add key="aspnet" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" /> + <add key="websdkfeed" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" /> + <add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" /> + <add key="roslyn" value="https://dotnet.myget.org/f/roslyn/api/v3/index.json" /> + <add key="symreader-native" value="https://dotnet.myget.org/f/symreader-native/api/v3/index.json" /> + <add key="xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" /> + <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" /> + <add key="vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" /> + <add key="web-api" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" /> + <add key="symreader-native" value="https://dotnet.myget.org/F/symreader-native/api/v3/index.json" /> + <add key="AspNetMaster" value="https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json" /> + + + + </packageSources> + </configuration> + + + + + + + + + + + + + diff --git a/run-build.ps1 b/run-build.ps1 index 17a46a335..510f953a9 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -106,7 +106,7 @@ if ($NoBuild) } else { - dotnet msbuild build.proj /p:Architecture=$Architecture /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles + dotnet msbuild build.proj /p:Architecture=$Architecture /p:GeneratePropsFile=true /t:WriteDynamicPropsToStaticPropsFiles $ExtraParameters dotnet msbuild build.proj /m /v:normal /fl /flp:v=diag /p:Architecture=$Architecture $ExtraParameters if($LASTEXITCODE -ne 0) { throw "Failed to build" } }