--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <HasRuntimePackages>false</HasRuntimePackages>
+ </PropertyGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
+ <ItemGroup>
+ <Project Include="$(MSBuildProjectName).pkgproj" />
+ </ItemGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
+</Project>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
+ <PropertyGroup>
+ <PackageType>Data</PackageType>
+ <Version>$(SharedFrameworkNugetVersion)</Version>
+ <OmitDependencies>true</OmitDependencies>
+ <SkipValidatePackage>true</SkipValidatePackage>
+
+ <!-- Include the platform manifest in the data dir. -->
+ <PlatformManifestTargetPath>data/</PlatformManifestTargetPath>
+
+ <!-- Exclude runtime.json from the package. -->
+ <IncludeRuntimeJson>false</IncludeRuntimeJson>
+ <IsLineupPackage>false</IsLineupPackage>
+
+ <!-- Remove package dependencies. -->
+ <ExcludeLineupReference>true</ExcludeLineupReference>
+ <PackProjectDependencies>false</PackProjectDependencies>
+ </PropertyGroup>
+
+ <!-- Redistribute package content from other nuget packages. -->
+ <ItemGroup>
+ <ProjectReference Include="..\Microsoft.NETCore.App\src\Microsoft.NETCore.App.depproj" />
+ </ItemGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+
+ <Target Name="GetPackageReport" />
+
+ <Target Name="MoveRefToData"
+ AfterTargets="ExpandProjectReferences">
+ <ItemGroup>
+ <!-- Move all refs into the data dir. Leave files like LICENSE.TXT in the root. -->
+ <File
+ Condition="$([System.String]::new('%(File.TargetPath)').StartsWith('ref'))"
+ TargetPath="data/" />
+ </ItemGroup>
+ </Target>
+
+</Project>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <UsingTask TaskName="GenerateFileVersionProps" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
-
<PropertyGroup>
<Version>$(SharedFrameworkNugetVersion)</Version>
<OmitDependencies>true</OmitDependencies>
<SkipValidatePackage>true</SkipValidatePackage>
<ShouldCreateLayout>false</ShouldCreateLayout>
- <PropsFile>$(IntermediateOutputPath)$(MSBuildProjectName).props</PropsFile>
- <PlatformManifestFile>$(IntermediateOutputPath)$(MSBuildProjectName).PlatformManifest.txt</PlatformManifestFile>
<PreventImplementationReference Condition="'$(PackageTargetRuntime)' != ''">true</PreventImplementationReference>
- <!-- During an official build when we can guarantee that all RID-specific dependencies have been built,
- restore all of those dependencies and gather the prospective content of the RID-specific Core.App
- packages. This is needed so that we have a complete platform manifest in the shipping version of
- the Microsoft.NETCore.App (RID-agnostic/identity package). -->
- <IncludeAllRuntimePackagesInPlatformManifest Condition="'$(BuildFullPlatformManifest)' == 'true'">true</IncludeAllRuntimePackagesInPlatformManifest>
+ <BuildTargetPath>build/$(NETCoreAppFramework)</BuildTargetPath>
+ <PlatformManifestTargetPath>$(BuildTargetPath)</PlatformManifestTargetPath>
+ <FileVersionPropsTargetPath>$(BuildTargetPath)</FileVersionPropsTargetPath>
</PropertyGroup>
<!-- Identity / Reference package content -->
<TargetFramework>$(NETCoreAppFramework)</TargetFramework>
</Dependency>
- <File Include="$(PropsFile)">
- <TargetPath>build/$(NETCoreAppFramework)</TargetPath>
- </File>
- <File Include="$(PlatformManifestFile)">
- <TargetPath>build/$(NETCoreAppFramework)</TargetPath>
- </File>
<File Include="$(MSBuildProjectName).targets">
- <TargetPath>build/$(NETCoreAppFramework)</TargetPath>
+ <TargetPath>$(BuildTargetPath)</TargetPath>
</File>
</ItemGroup>
</ProjectReference>
</ItemGroup>
- <Target Name="GenerateFileVersionProps" BeforeTargets="GenerateNuSpec" Condition="'$(PackageTargetRuntime)' == ''">
- <MSBuild Projects="@(ProjectReference)"
- Condition="'%(ProjectReference.PackageTargetRuntime)' == '$(PackageRID)' OR
- '%(ProjectReference.BuidOnRID)' == '$(PackageRID)' OR
- ('$(IncludeAllRuntimePackagesInPlatformManifest)' == 'true' AND
- '%(ProjectReference.PackageTargetRuntime)' != '' AND
- '%(ProjectReference.ExcludeFromPlatformManifest)' != 'true')"
- Targets="GetPackageFiles">
- <Output TaskParameter="TargetOutputs" ItemName="SharedFrameworkRuntimeFiles" />
- </MSBuild>
-
- <GenerateFileVersionProps Files="@(SharedFrameworkRuntimeFiles)"
- PackageId="$(Id)"
- PackageVersion="$(Version)"
- PlatformManifestFile="$(PlatformManifestFile)"
- PropsFile="$(PropsFile)"
- PreferredPackages="$(Id);@(RuntimeDependency)" />
- </Target>
-
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
<Target Name="GetPackageReport" />
[
{
"Name": "RuntimePackage",
- "Description": "Internal implementation package not meant for direct consumption. Please do not reference directly.",
+ "Description": "Internal implementation package not meant for direct consumption. Please do not reference directly.",
"CommonTypes": [ ]
},
{
"Name": "Microsoft.NETCore.App",
"Description": "A set of .NET APIs that are included in the default .NET Core application model.",
"CommonTypes": [ ]
+ },
+ {
+ "Name": "Microsoft.NETCore.App.Ref",
+ "Description": "A set of .NET APIs that are included in the default .NET Core application model. Contains reference assemblies, documentation, and other design-time assets.",
+ "CommonTypes": [ ]
}
]
<IncludeSourceFilesInPackage Condition="'$(DotNetBuildFromSource)' == 'true'">false</IncludeSourceFilesInPackage>
<IncludeSourceFilesInPackage Condition="'$(IncludeSourceFilesInPackage)' == ''">true</IncludeSourceFilesInPackage>
+
+ <PackProjectDependencies>true</PackProjectDependencies>
</PropertyGroup>
<PropertyGroup Condition="'$(PackageTargetRuntime)' == ''">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.targets" />
+ <UsingTask TaskName="GenerateFileVersionProps" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
+
<PropertyGroup>
<RestorePackages>true</RestorePackages>
<PrereleaseResolveNuGetPackages>true</PrereleaseResolveNuGetPackages>
</ItemGroup>
</Target>
- <Target Name="GetDependenciesToPackage" AfterTargets="ExpandProjectReferences">
+ <Target Name="GetDependenciesToPackage"
+ Condition="'$(PackProjectDependencies)' == 'true'"
+ AfterTargets="ExpandProjectReferences">
<!-- allow projects to provide dependencies -->
<MSBuild Targets="GetDependenciesToPackage"
BuildInParallel="$(BuildInParallel)"
</MSBuild>
</Target>
+ <!--
+ Creates the platform manifest and props file. Set properties "IncludePlatformManifestFile" and
+ "IncludeFileVersionPropsFile" to true to include them, respectively.
+ -->
+ <Target Name="GenerateFileVersionProps">
+ <PropertyGroup>
+ <PropsFile>$(IntermediateOutputPath)$(MSBuildProjectName).props</PropsFile>
+ <PlatformManifestFile>$(IntermediateOutputPath)$(MSBuildProjectName).PlatformManifest.txt</PlatformManifestFile>
+
+ <!-- During an official build when we can guarantee that all RID-specific dependencies have been built,
+ restore all of those dependencies and gather the prospective content of the RID-specific Core.App
+ packages. This is needed so that we have a complete platform manifest in the shipping version of
+ the Microsoft.NETCore.App (RID-agnostic/identity package). -->
+ <IncludeAllRuntimePackagesInPlatformManifest
+ Condition="'$(IncludeAllRuntimePackagesInPlatformManifest)' == '' AND
+ '$(BuildFullPlatformManifest)' == 'true'">true</IncludeAllRuntimePackagesInPlatformManifest>
+ </PropertyGroup>
+
+ <MSBuild Projects="@(ProjectReference)"
+ Condition="'%(ProjectReference.PackageTargetRuntime)' == '$(PackageRID)' OR
+ '%(ProjectReference.BuidOnRID)' == '$(PackageRID)' OR
+ ('$(IncludeAllRuntimePackagesInPlatformManifest)' == 'true' AND
+ '%(ProjectReference.PackageTargetRuntime)' != '' AND
+ '%(ProjectReference.ExcludeFromPlatformManifest)' != 'true')"
+ Targets="GetPackageFiles">
+ <Output TaskParameter="TargetOutputs" ItemName="SharedFrameworkRuntimeFiles" />
+ </MSBuild>
+
+ <GenerateFileVersionProps Files="@(SharedFrameworkRuntimeFiles)"
+ PackageId="$(Id)"
+ PackageVersion="$(Version)"
+ PlatformManifestFile="$(PlatformManifestFile)"
+ PropsFile="$(PropsFile)"
+ PreferredPackages="$(Id);@(RuntimeDependency)" />
+ </Target>
+
+ <Target Name="IncludeFileVersionPropsFile"
+ DependsOnTargets="GenerateFileVersionProps"
+ BeforeTargets="GetFiles"
+ Condition="'$(PackageTargetRuntime)' == '' AND '$(FileVersionPropsTargetPath)' != ''">
+ <ItemGroup>
+ <File Include="$(PropsFile)">
+ <TargetPath>$(FileVersionPropsTargetPath)</TargetPath>
+ </File>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="IncludePlatformManifestFile"
+ DependsOnTargets="GenerateFileVersionProps"
+ BeforeTargets="GetFiles"
+ Condition="'$(PackageTargetRuntime)' == '' AND '$(PlatformManifestTargetPath)' != ''">
+ <ItemGroup>
+ <File Include="$(PlatformManifestFile)">
+ <TargetPath>$(PlatformManifestTargetPath)</TargetPath>
+ </File>
+ </ItemGroup>
+ </Target>
+
</Project>
\ No newline at end of file
var manifestFileName = Path.GetFileName(PlatformManifestFile);
itemGroup.AddItem(PlatformManifestsItem, $"$(MSBuildThisFileDirectory){manifestFileName}");
+ Directory.CreateDirectory(Path.GetDirectoryName(PlatformManifestFile));
using (var manifestWriter = File.CreateText(PlatformManifestFile))
{
foreach (var fileData in fileVersions)