Skip to content

Commit

Permalink
Use MSBuild to set NuGet feeds instead of NuGet.config (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
natemcmaster authored Nov 21, 2017
1 parent 6e75c8e commit 32625f1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<Project>

<Import Project="build\dependencies.props" />
<Import Project="build\sources.props" />

<PropertyGroup>
<Product>Microsoft ASP.NET Core</Product>
Expand Down
4 changes: 1 addition & 3 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
<add key="AspNetCoreTools" value="https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<!-- Restore sources should be defined in build/sources.props. -->
</packageSources>
</configuration>
16 changes: 16 additions & 0 deletions build/sources.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project>
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>

<PropertyGroup Label="RestoreSources">
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true' AND '$(AspNetUniverseBuildOffline)' != 'true' ">
$(RestoreSources);
https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
</RestoreSources>
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
</RestoreSources>
</PropertyGroup>
</Project>

0 comments on commit 32625f1

Please sign in to comment.