Use RestoreAdditionalProjectSources instead of RestoreSources

- The former is additive while the latter replaces the existing sources
This commit is contained in:
Suchiman 2018-05-25 20:38:45 +02:00 committed by Steve Sanderson
parent 54eda39cb8
commit 0e5f9c2562
5 changed files with 10 additions and 20 deletions

View File

@ -84,12 +84,10 @@ To use a nightly or developer CI build of the Blazor package, ensure that you ha
Update your projects to include the Blazor developer feed (`https://dotnet.myget.org/f/blazor-dev/api/v3/index.json`) and ASP.NET Core developer feed (`https://dotnet.myget.org/F/dotnet-core/api/v3/index.json`). You can do this in a project file with MSBuild:
```xml
<RestoreSources>
$(RestoreSources);
https://api.nuget.org/v3/index.json;
<RestoreAdditionalProjectSources>
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
</RestoreSources>
</RestoreAdditionalProjectSources>
```
Or in a NuGet.config in the same directory as the solution file:

View File

@ -3,11 +3,9 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Exe</OutputType>
<RestoreSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
<RestoreAdditionalProjectSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
</RestoreSources>
</RestoreAdditionalProjectSources>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

View File

@ -2,11 +2,9 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RestoreSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
<RestoreAdditionalProjectSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
</RestoreSources>
</RestoreAdditionalProjectSources>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

View File

@ -5,11 +5,9 @@
<OutputType>Library</OutputType>
<IsPackable>true</IsPackable>
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
<RestoreSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
<RestoreAdditionalProjectSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
</RestoreSources>
</RestoreAdditionalProjectSources>
<LangVersion>7.3</LangVersion>
</PropertyGroup>

View File

@ -4,11 +4,9 @@
<TargetFramework>netstandard2.0</TargetFramework>
<RunCommand>dotnet</RunCommand>
<RunArguments>blazor serve</RunArguments>
<RestoreSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
<RestoreAdditionalProjectSources Condition="'$(IncludeCustomRestoreSourcesSymbol)'=='true'">
https://dotnet.myget.org/f/blazor-dev/api/v3/index.json;
</RestoreSources>
</RestoreAdditionalProjectSources>
<LangVersion>7.3</LangVersion>
</PropertyGroup>