| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <Project>
- <PropertyGroup>
- <OutputInRepoRoot>true</OutputInRepoRoot>
- <!-- Temporary flag to disable restoring this project against the artifacts/ folder. -->
- <_DisableRestoreFromLocalPackages>true</_DisableRestoreFromLocalPackages>
- </PropertyGroup>
- <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
- <IsShippingPackage>true</IsShippingPackage>
- <IsPackable>true</IsPackable>
- <PackageDescription>Provides a default set of APIs for building an ASP.NET Core application. Contains reference assemblies, documentation, and other design-time assets.
- This package is an internal implementation of the .NET Core SDK and is not meant to be used as a normal PackageReference.</PackageDescription>
- <PackageTags>aspnetcore;targeting-pack</PackageTags>
- <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
- <PackageType>DotnetPlatform</PackageType>
- <RefAssemblyPackagePath>ref/$(TargetFramework)/</RefAssemblyPackagePath>
- <LayoutTargetDir>$(TargetingPackLayoutRoot)packs/Microsoft.AspNetCore.App.Ref/$(PackageVersion)/</LayoutTargetDir>
- <ArchiveOutputFileName>aspnetcore-targeting-pack-$(PackageVersion).zip</ArchiveOutputFileName>
- <ArchiveOutputPath>$(InstallersOutputPath)$(ArchiveOutputFileName)</ArchiveOutputPath>
- <!-- There are no symbols for reference assemblies. -->
- <IncludeSymbols>false</IncludeSymbols>
- <!-- The project representing the shared framework doesn't produce a .NET assembly or symbols. -->
- <DebugType>none</DebugType>
- <IncludeBuildOutput>false</IncludeBuildOutput>
- <CopyBuildOutputToPublishDirectory>false</CopyBuildOutputToPublishDirectory>
- <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
- <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>
- <GenerateDependencyFile>false</GenerateDependencyFile>
- <!-- This project should not be referenced via the `<Reference>` impementation. -->
- <IsProjectReferenceProvider>false</IsProjectReferenceProvider>
- <PackageConflictManifestFileName>PackageOverrides.txt</PackageConflictManifestFileName>
- <PackageConflictManifestPackagePath>data/</PackageConflictManifestPackagePath>
- <!-- Reference implementation assemblies in addition to ref assemblies to get xml docs -->
- <ReferenceImplementationAssemblies>true</ReferenceImplementationAssemblies>
- </PropertyGroup>
- <ItemGroup>
- <!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
- <Reference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)" />
- </ItemGroup>
- <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
- <PropertyGroup>
- <BuildDependsOn>
- $(BuildDependsOn);
- GeneratePackageConflictManifest;
- _ResolveTargetingPackContent;
- _BatchCopyToLayoutTargetDir;
- _CreateTargetingPackArchive;
- </BuildDependsOn>
- </PropertyGroup>
- <!-- Override the default MSBuild targets so that nothing is returned from the project since it represents a collection of assemblies. -->
- <Target Name="GetTargetPath" />
- <Target Name="Build" DependsOnTargets="$(BuildDependsOn)">
- <Message Importance="High" Text="$(MSBuildProjectName) -> $(TargetDir)" />
- </Target>
- <!-- This project doesn't compile anything. -->
- <Target Name="CoreCompile" />
- <!-- Completely disable default targets for copying to output. -->
- <Target Name="CopyFilesToOutputDirectory" />
- <!-- This target finds the reference assemblies. -->
- <Target Name="_ResolveTargetingPackContent"
- BeforeTargets="_GetPackageFiles"
- DependsOnTargets="ResolveReferences;FindReferenceAssembliesForReferences">
- <ItemGroup>
- <AspNetCoreReferenceAssemblyPath
- Include="@(ReferencePathWithRefAssemblies)"
- Exclude="
- @(ReferencePathWithRefAssemblies->WithMetadataValue('NuGetPackageId', 'Microsoft.NETCore.App'));
- @(ReferencePathWithRefAssemblies->WithMetadataValue('ReferenceGrouping', 'Microsoft.NETCore.App'));" />
- <AspNetCoreReferenceDocXml Include="@(_ResolvedProjectReferencePaths->WithMetadataValue('IsReferenceAssembly', 'false')->'%(RootDir)%(Directory)%(FileName).xml')" />
- <RefPackContent Include="@(AspNetCoreReferenceAssemblyPath)" PackagePath="$(RefAssemblyPackagePath)" />
- <RefPackContent Include="@(AspNetCoreReferenceDocXml)" PackagePath="$(RefAssemblyPackagePath)" />
- <RefPackContent Include="$(TargetDir)$(PackageConflictManifestFileName)" PackagePath="$(PackageConflictManifestPackagePath)" />
- <_PackageFiles Include="@(RefPackContent)" />
- </ItemGroup>
- </Target>
- <Target Name="GeneratePackageConflictManifest"
- DependsOnTargets="ResolveReferences"
- Inputs="$(MSBuildAllProjects)"
- Outputs="$(TargetDir)$(PackageConflictManifestFileName)">
- <ItemGroup>
- <_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(NuGetPackageId)|%(NuGetPackageVersion)')" Condition=" '%(ReferencePath.NuGetPackageId)' != 'Microsoft.NETCore.App' AND '%(ReferencePath.NuGetSourceType)' == 'Package' " />
- <_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(FileName)|$(SharedFxVersion)')" Condition=" '%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' " />
- </ItemGroup>
- <WriteLinesToFile
- Lines="@(_AspNetCoreAppPackageOverrides)"
- File="$(TargetDir)$(PackageConflictManifestFileName)"
- Overwrite="true" />
- </Target>
- <!-- Written to take advantage of target batching in MSBuild. -->
- <Target Name="_BatchCopyToLayoutTargetDir"
- DependsOnTargets="_ResolveTargetingPackContent"
- Inputs="@(RefPackContent)"
- Outputs="@(RefPackContent->'$(LayoutTargetDir)%(PackagePath)%(FileName)%(Extension)')">
- <Copy SourceFiles="@(RefPackContent)"
- DestinationFiles="@(RefPackContent->'$(LayoutTargetDir)%(PackagePath)%(FileName)%(Extension)')"
- UseHardlinksIfPossible="true" />
- </Target>
- <Target Name="_CreateTargetingPackArchive"
- Inputs="@(RefPackContent)"
- Outputs="$(ArchiveOutputPath)"
- Condition="'$(IsPackable)' != 'false'">
- <ZipDirectory
- SourceDirectory="$(TargetingPackLayoutRoot)"
- DestinationFile="$(ArchiveOutputPath)"
- Overwrite="true" />
- </Target>
- </Project>
|