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

Commit 28aae41

Browse files
author
Nate McMaster
committed
Use MSBuild to set NuGet feeds instead of NuGet.config
1 parent 3408358 commit 28aae41

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

Directory.Build.props

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
<Import Project="version.props" />
77
<Import Project="build\dependencies.props" />
8+
<Import Project="build\sources.props" />
89

910
<PropertyGroup>
1011
<Product>Microsoft ASP.NET Core</Product>

NuGet.config

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<configuration>
33
<packageSources>
44
<clear />
5-
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
6-
<add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
7-
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
5+
<!-- Restore sources should be defined in build/sources.props. -->
86
</packageSources>
97
</configuration>

build/sources.props

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project>
2+
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>
3+
4+
<PropertyGroup Label="RestoreSources">
5+
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
6+
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' ">
7+
$(RestoreSources);
8+
https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json;
9+
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
10+
</RestoreSources>
11+
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
12+
$(RestoreSources);
13+
https://api.nuget.org/v3/index.json;
14+
</RestoreSources>
15+
</PropertyGroup>
16+
</Project>

0 commit comments

Comments
 (0)