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

This commit is contained in:
Nate McMaster 2018-03-13 12:23:18 -07:00 committed by GitHub
parent 349acb5bb3
commit 016fa66640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 6 deletions

View File

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

View File

@ -46,7 +46,7 @@
<MSBuild <MSBuild
Projects="$(_WorkRoot)Archive.csproj" Projects="$(_WorkRoot)Archive.csproj"
Targets="Restore" 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 --> <!-- Create the archive -->
<Exec Command="$(ArchiverPath) -a $(FallbackOutputPath) $(FallbackStagingDir)" /> <Exec Command="$(ArchiverPath) -a $(FallbackOutputPath) $(FallbackStagingDir)" />

View File

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

View File

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

View File

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

View File

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

View File

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