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

Commit cd3e3c6

Browse files
author
Nate McMaster
committedNov 20, 2017
Use MSBuild to set NuGet feeds instead of NuGet.config
1 parent 0de9f0e commit cd3e3c6

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
@@ -1,6 +1,7 @@
11
<Project>
22
<Import Project="version.props" />
33
<Import Project="build\dependencies.props" />
4+
<Import Project="build\sources.props" />
45

56
<PropertyGroup>
67
<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)
This repository has been archived.