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

Commit dfe3639

Browse files
author
Nate McMaster
committed
Use MSBuild to set NuGet feeds instead of NuGet.config
1 parent 5d7c93d commit dfe3639

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

Directory.Build.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<Project>
2+
<Import Project="build\sources.props" />
23
<Import Project="build\dependencies.props" />
34
<Import Project="build\dependencies.targets" />
45
<Import Project="build\dependencies.g.targets" Condition="Exists('build\dependencies.g.targets') AND '$(DesignTimeBuild)' != 'true'" />

NuGet.config

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="AspNetCorePatch" value="https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json" />
6-
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json" />
7-
<add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
8-
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
5+
<!-- Restore sources should be defined in build/sources.props. -->
96
</packageSources>
107
</configuration>

build/sources.props

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project>
2+
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>
3+
4+
<PropertyGroup>
5+
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
6+
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
7+
$(RestoreSources);
8+
https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json;
9+
https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json;
10+
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
11+
https://api.nuget.org/v3/index.json;
12+
</RestoreSources>
13+
</PropertyGroup>
14+
</Project>

0 commit comments

Comments
 (0)