Skip to content

Commit

Permalink
Use MSBuild to set NuGet feeds instead of NuGet.config
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate McMaster committed Oct 2, 2017
1 parent dfcff47 commit cb2a013
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Project>
<Import Project="build\sources.props" />
<Import Project="build\dependencies.props" />
<Import Project="build\dependencies.targets" />
<Import Project="build\dependencies.g.targets" Condition="Exists('build\dependencies.g.targets') AND '$(DesignTimeBuild)' != 'true'" />
Expand Down
5 changes: 1 addition & 4 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="AspNetCorePatch" value="https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json" />
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-master/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>
2 changes: 1 addition & 1 deletion build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<AspNetCoreVersion>2.0.0</AspNetCoreVersion>
<CoreFxVersion>4.4.0</CoreFxVersion>
<DiagnosticSourceVersion>4.4.1</DiagnosticSourceVersion>
<DependencyModelVersion>2.0.0</DependencyModelVersion>
<EF6Version>6.1.3</EF6Version>
<InternalAspNetCoreSdkVersion>2.0.1-rtm-15400</InternalAspNetCoreSdkVersion>
<JsonNetVersion>10.0.1</JsonNetVersion>
<MicrosoftExtensionsDependencyModelPackageVersion>2.0.2-servicing-25728-02</MicrosoftExtensionsDependencyModelPackageVersion>
<MoqVersion>4.7.49</MoqVersion>
<NETFrameworkPackageVersion>2.0.0</NETFrameworkPackageVersion>
<NETStandardImplicitPackageVersion>2.0.0</NETStandardImplicitPackageVersion>
Expand Down
14 changes: 14 additions & 0 deletions build/sources.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>

<PropertyGroup>
<RestoreSources>$(DotNetRestoreSources)</RestoreSources>
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
$(RestoreSources);
https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;
https://api.nuget.org/v3/index.json;
</RestoreSources>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(RoslynVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(DependencyModelVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelPackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit cb2a013

Please sign in to comment.