Writing a NuGet.config as part of the preparatory steps.
This commit is contained in:
parent
e303461ab6
commit
e7f4fb001b
6 changed files with 67 additions and 24 deletions
20
NuGet.Config
20
NuGet.Config
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
<add key="TransportFeed" 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>
|
|
@ -29,10 +29,11 @@
|
|||
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/dotnet-cli-build.csproj.nuget.g.props" />
|
||||
<RestoreDotnetCliBuildFrameworkOutputs Include="$(DotnetCliBuildDirectory)/obj/dotnet-cli-build.csproj.nuget.g.targets" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<Target Name="RestoreDotnetCliBuildFramework"
|
||||
Inputs="$(DotnetCliBuildDirectory)/dotnet-cli-build.csproj"
|
||||
Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)">
|
||||
Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)"
|
||||
DependsOnTargets="WriteNugetConfigFile">
|
||||
|
||||
<PropertyGroup>
|
||||
<ExtraRestoreArgs>$(ExtraRestoreArgs) /p:GeneratePropsFile=$(GeneratePropsFile)</ExtraRestoreArgs>
|
||||
|
@ -48,6 +49,7 @@
|
|||
<Import Project="build/GitCommitInfo.targets" />
|
||||
<Import Project="build/HostInfo.targets" />
|
||||
<Import Project="build/BuildInfo.targets" />
|
||||
<Import Project="build/NugetConfigFile.targets" />
|
||||
<Import Project="build/Prepare.targets" />
|
||||
<Import Project="build/Compile.targets" />
|
||||
<Import Project="build/Package.targets" />
|
||||
|
|
|
@ -4,5 +4,7 @@
|
|||
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
|
||||
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
|
||||
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
|
||||
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
|
||||
<GeneratedNuGetConfig>$(RepoRoot)/NuGet.Config</GeneratedNuGetConfig>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="WriteDynamicPropsToStaticPropsFiles"
|
||||
DependsOnTargets="BuildDotnetCliBuildFramework;
|
||||
DependsOnTargets="WriteNugetConfigFile;
|
||||
BuildDotnetCliBuildFramework;
|
||||
EnsureGeneratedPropsDirectory;
|
||||
WriteGitCommitInfoProps;
|
||||
WriteHostInfoProps;
|
||||
|
|
58
build/NugetConfigFile.targets
Normal file
58
build/NugetConfigFile.targets
Normal file
|
@ -0,0 +1,58 @@
|
|||
<Project ToolsVersion="15.0">
|
||||
<Target Name="WriteNugetConfigFile">
|
||||
|
||||
<PropertyGroup>
|
||||
<NugetConfigHeader>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
</NugetConfigHeader>
|
||||
|
||||
<NugetConfigFeedsPrivate>
|
||||
<add key="PrivateBlobFeed" value="$(ExternalRestoreSources)" />
|
||||
</NugetConfigFeedsPrivate>
|
||||
|
||||
<NugetConfigFeedsNormal>
|
||||
<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" />
|
||||
</NugetConfigFeedsNormal>
|
||||
|
||||
<NugetConfigSuffix>
|
||||
</packageSources>
|
||||
</configuration>
|
||||
</NugetConfigSuffix>
|
||||
</PropertyGroup>
|
||||
|
||||
<WriteLinesToFile File="$(GeneratedNuGetConfig)"
|
||||
Lines="$(NugetConfigHeader)"
|
||||
Overwrite="true" />
|
||||
|
||||
<WriteLinesToFile Condition="'$(ExternalRestoreSources)' != ''"
|
||||
File="$(GeneratedNuGetConfig)"
|
||||
Lines="$(NugetConfigFeedsPrivate)"
|
||||
Overwrite="false" />
|
||||
|
||||
<WriteLinesToFile Condition="'$(DotNetBuildOffline)' != 'true'"
|
||||
File="$(GeneratedNuGetConfig)"
|
||||
Lines="$(NugetConfigFeedsNormal)"
|
||||
Overwrite="false" />
|
||||
|
||||
<WriteLinesToFile File="$(GeneratedNuGetConfig)"
|
||||
Lines="$(NugetConfigSuffix)"
|
||||
Overwrite="false" />
|
||||
|
||||
</Target>
|
||||
</Project>
|
|
@ -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" }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue