Merge pull request #8443 from johnbeisner/WriteNugetConfigFileTargetModification

Generate a Nuget.config once
This commit is contained in:
John Beisner 2018-01-22 14:11:27 -08:00 committed by GitHub
commit f6bc5d0ad9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View file

@ -1,6 +1,7 @@
<Project ToolsVersion="15.0">
<Target Name="DownloadPackageVersionsProps"
DependsOnTargets="BuildDotnetCliBuildFramework">
Condition=" !Exists('$(OrchestratedPackageVersionsProps)') "
DependsOnTargets="BuildDotnetCliBuildFramework">
<DownloadFile Uri="$(PB_PackageVersionPropsUrl)$(CoreSetupBlobAccessTokenParam)"
DestinationPath="$(OrchestratedPackageVersionsProps)"

View file

@ -1,10 +1,11 @@
<Project ToolsVersion="15.0">
<Target Name="WriteNugetConfigFile">
<Target Name="WriteNugetConfigFile"
Condition=" !Exists('$(GeneratedNuGetConfig)') ">
<ItemGroup>
<NugetConfigPrivateFeeds Include="$(ExternalRestoreSources.Split(';'))" />
</ItemGroup>
<ItemGroup>
<NugetConfigPrivateFeeds Include="$(ExternalRestoreSources.Split(';'))" />
</ItemGroup>
<PropertyGroup>
<NugetConfigHeader>
<![CDATA[
@ -40,13 +41,13 @@
</configuration>
]]>
</NugetConfigSuffix>
</PropertyGroup>
</PropertyGroup>
<WriteLinesToFile File="$(GeneratedNuGetConfig)"
Lines="$(NugetConfigHeader)"
Overwrite="true" />
<WriteLinesToFile Condition="'$(ExternalRestoreSources)' != '' and '$(DotNetBuildOffline)' != 'true'"
File="$(GeneratedNuGetConfig)"
Lines="&lt;add key=&quot;PrivateBlobFeed&quot; value=&quot;%(NugetConfigPrivateFeeds.Identity)&quot; /&gt;"