Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit f29acd3

Browse files
author
John Beisner
committed
If the build is a 'DotNetBuildOffline'; do not write any feed lines.
1 parent 34351d6 commit f29acd3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

build/NugetConfigFile.targets

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
]]>
1717
</NugetConfigHeader>
1818

19-
<NugetConfigFeedsNormal>
19+
<NugetConfigCLIFeeds>
2020
<![CDATA[
2121
<add key="BlobFeed" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
2222
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
@@ -32,28 +32,29 @@
3232
<add key="web-api" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />
3333
<add key="symreader-native" value="https://dotnet.myget.org/F/symreader-native/api/v3/index.json" />
3434
]]>
35-
</NugetConfigFeedsNormal>
35+
</NugetConfigCLIFeeds>
3636

3737
<NugetConfigSuffix>
3838
<![CDATA[
3939
</packageSources>
4040
</configuration>
4141
]]>
4242
</NugetConfigSuffix>
43-
</PropertyGroup>
43+
44+
</PropertyGroup>
4445

4546
<WriteLinesToFile File="$(GeneratedNuGetConfig)"
4647
Lines="$(NugetConfigHeader)"
4748
Overwrite="true" />
4849

49-
<WriteLinesToFile Condition="'$(ExternalRestoreSources)' != ''"
50+
<WriteLinesToFile Condition="'$(ExternalRestoreSources)' != '' and '$(DotNetBuildOffline)' != 'true'"
5051
File="$(GeneratedNuGetConfig)"
5152
Lines="&lt;add key=&quot;PrivateBlobFeed&quot; value=&quot;%(NugetConfigPrivateFeeds.Identity)&quot; /&gt;"
5253
Overwrite="false" />
5354

5455
<WriteLinesToFile Condition="'$(DotNetBuildOffline)' != 'true'"
5556
File="$(GeneratedNuGetConfig)"
56-
Lines="$(NugetConfigFeedsNormal)"
57+
Lines="$(NugetConfigCLIFeeds)"
5758
Overwrite="false" />
5859

5960
<WriteLinesToFile File="$(GeneratedNuGetConfig)"

0 commit comments

Comments
 (0)