Map properties DotNetRestoreSources => RestoreSources for metapackage builds (#955)

This commit is contained in:
Nate McMaster 2018-03-13 12:23:18 -07:00 коммит произвёл GitHub
Родитель 349acb5bb3
Коммит 016fa66640
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 20 добавлений и 6 удалений

Просмотреть файл

@ -2,6 +2,6 @@
<configuration>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<!-- Restore sources should be defined in build/sources.props. -->
</packageSources>
</configuration>
</configuration>

Просмотреть файл

@ -46,7 +46,7 @@
<MSBuild
Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore"
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp21PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);AspNetUniverseBuildOffline=true" />
Properties="RestorePackagesPath=$(FallbackStagingDir);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp21PackageVersion);DotNetRestoreSourcePropsPath=$(GeneratedFallbackRestoreSourcesPropsPath);DotNetBuildOffline=true;AspNetUniverseBuildOffline=true" />
<!-- Create the archive -->
<Exec Command="$(ArchiverPath) -a $(FallbackOutputPath) $(FallbackStagingDir)" />

Просмотреть файл

@ -28,7 +28,11 @@
<PropertyGroup>
<MetapackageSource>$(_MetapackageSrcRoot)$(MetapackageName)\</MetapackageSource>
<MetapackageWorkDirectory>$(_WorkRoot)$(MetapackageName)\</MetapackageWorkDirectory>
<CommonProps>Configuration=$(Configuration);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath);AspNetUniverseBuildOffline=true</CommonProps>
<CommonProps />
<CommonProps>$(CommonProps);Configuration=$(Configuration)</CommonProps>
<CommonProps>$(CommonProps);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath)</CommonProps>
<CommonProps>$(CommonProps);DotNetBuildOffline=true</CommonProps>
<CommonProps>$(CommonProps);AspNetUniverseBuildOffline=true</CommonProps>
<CommonProps>$(CommonProps);RuntimeFrameworkVersion=$(MicrosoftNETCoreApp21PackageVersion)</CommonProps>
<CommonProps>$(CommonProps);AppMetapackageVersion=$(PackageVersion)</CommonProps>
</PropertyGroup>
@ -121,6 +125,7 @@
<CommonSharedFxProps>Configuration=$(Configuration);RuntimeIdentifier=$(SharedFxRestoreRid)</CommonSharedFxProps>
<CommonSharedFxProps>$(CommonSharedFxProps);DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath)</CommonSharedFxProps>
<CommonSharedFxProps>$(CommonSharedFxProps);DotNetBuildOffline=true</CommonSharedFxProps>
<CommonSharedFxProps>$(CommonSharedFxProps);AspNetUniverseBuildOffline=true</CommonSharedFxProps>
</PropertyGroup>
</Target>

Просмотреть файл

@ -1,11 +1,17 @@
<Project>
<Import Project="$(DotNetRestoreSourcePropsPath)" Condition="'$(DotNetRestoreSourcePropsPath)' != ''"/>
<PropertyGroup>
<RestoreSources>$(DotNetAdditionalRestoreSources)</RestoreSources>
<RestoreSources>
$(DotNetAdditionalRestoreSources);
$(DotNetRestoreSources);
</RestoreSources>
<RestoreSources Condition=" '$(DotNetBuildOffline)' != 'true' ">
$(RestoreSources);
https://api.nuget.org/v3/index.json;
</RestoreSources>
<RestoreSources Condition=" '$(DisableMyGetRestoreSources)' != 'true' ">
<RestoreSources Condition=" '$(DotNetBuildOffline)' != 'true' AND '$(DisableMyGetRestoreSources)' != 'true' ">
$(RestoreSources);
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json;

Просмотреть файл

@ -6,6 +6,7 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
<EnableApiCheck>false</EnableApiCheck>
<DotnetCliToolTargetFramework>netcoreapp2.1</DotnetCliToolTargetFramework>
<RestoreSources>$(RestoreSources);$(DotNetRestoreSources);</RestoreSources>
</PropertyGroup>
</Project>

Просмотреть файл

@ -6,6 +6,7 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<RestoreSources>$(RestoreSources);$(DotNetRestoreSources);</RestoreSources>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -2,4 +2,5 @@
<Import Project="..\version.props" />
<Import Project="..\build\common.props" />
<Import Project="..\build\external-dependencies.props" />
<Import Project="..\build\sources.props" />
</Project>