<PropertyGroup>
<MicrosoftDiaSymReaderNativePackageVersion>1.7.0</MicrosoftDiaSymReaderNativePackageVersion>
+ </PropertyGroup>
+
+ <!-- Get Windows.winmd for crossgen. -->
+ <PropertyGroup>
+ <MicrosoftTargetingPackPrivateWinRTPackage>Microsoft.TargetingPack.Private.WinRT</MicrosoftTargetingPackPrivateWinRTPackage>
<MicrosoftTargetingPackPrivateWinRTPackageVersion>1.0.5</MicrosoftTargetingPackPrivateWinRTPackageVersion>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
- <Project Include="$(ProjectsBasePath)*\*.builds">
+ <Project Include="$(ProjectsBasePath)pkg.builds">
<AdditionalProperties>$(AdditionalProperties)</AdditionalProperties>
</Project>
</ItemGroup>
+++ /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/PlatformManifest.txt</PlatformManifestTargetPath>
- <FrameworkListTargetPath>data/</FrameworkListTargetPath>
-
- <!-- Exclude runtime.json from the package. -->
- <IncludeRuntimeJson>false</IncludeRuntimeJson>
- <IsLineupPackage>false</IsLineupPackage>
-
- <!-- Remove package dependencies. -->
- <ExcludeLineupReference>true</ExcludeLineupReference>
- <PackProjectDependencies>false</PackProjectDependencies>
-
- <!-- Location to lay out data/ dir. Used later to create installers. -->
- <DataLayoutDir>$(IntermediateOutputPath)layout/</DataLayoutDir>
- </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>
-
- <!--
- Copy the files in the package's data/ dir to a layout directory. This is what the targeting pack
- installer will place in the dotnet install dir.
-
- This extracts from the nupkg (zip) directly. An alternative would be using the PackageFile
- items, but there's some risk of handling TargetPath metadata differently than NuGet does. Using
- the nupkg directly ensures results are identical.
- -->
- <Target Name="CreateTargetingPackLayout"
- AfterTargets="CreatePackage">
- <PropertyGroup>
- <TargetingPackNupkgFile>$(PackageOutputPath)$(Id).$(PackageVersion).nupkg</TargetingPackNupkgFile>
- </PropertyGroup>
-
- <ZipFileGetEntries TargetArchive="$(TargetingPackNupkgFile)">
- <Output TaskParameter="Entries" ItemName="TargetingPackNupkgEntries" />
- </ZipFileGetEntries>
-
- <ItemGroup>
- <TargetingPackDataEntries
- Include="@(TargetingPackNupkgEntries)"
- Condition="$([System.String]::new('%(TargetingPackNupkgEntries.Identity)').StartsWith('data/'))" />
- </ItemGroup>
-
- <ZipFileExtractToDirectory
- SourceArchive="$(TargetingPackNupkgFile)"
- DestinationDirectory="$(DataLayoutDir)packs/$(Id)/$(Version)/"
- OverwriteDestination="true"
- Include="@(TargetingPackDataEntries)" />
- </Target>
-
-</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" />
-
- <!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
- <ItemGroup>
- <Project Include="$(MSBuildProjectName).pkgproj" />
- </ItemGroup>
-
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
-</Project>
\ No newline at end of file
+++ /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" />
-
- <!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
- <ItemGroup>
- <Project Include="$(MSBuildProjectName).pkgproj" />
- </ItemGroup>
-
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
-</Project>
\ No newline at end of file
+++ /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" />
-
- <!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
- <ItemGroup>
- <Project Include="$(MSBuildProjectName).pkgproj" />
- </ItemGroup>
-
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
-</Project>
\ No newline at end of file
"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": [ ]
+ },
+ {
+ "Name": "Microsoft.WindowsDesktop.App.Ref",
+ "Description": "Windows Forms and WPF targeting pack. Contains reference assemblies, documentation, and other design-time assets.",
+ "CommonTypes": [ ]
}
]
<IsLineupPackage Condition="'$(PackageTargetRuntime)' == ''">true</IsLineupPackage>
- <IncludeSourceFilesInPackage Condition="'$(DotNetBuildFromSource)' == 'true'">false</IncludeSourceFilesInPackage>
- <IncludeSourceFilesInPackage Condition="'$(IncludeSourceFilesInPackage)' == ''">true</IncludeSourceFilesInPackage>
+ <BuildRuntimePackages>true</BuildRuntimePackages>
<PackProjectDependencies>true</PackProjectDependencies>
</PropertyGroup>
+ <ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
+ <!-- WindowsDesktop packs currently depend on non-source-built App package. -->
+ <ProjectExclusions Include="windowsdesktop\**\*.*proj" />
+ </ItemGroup>
+
<ItemGroup>
<FrameworkListRootAttributes Include="Name" Value="$(NETCoreAppFrameworkBrandName)" />
<FrameworkListRootAttributes Include="TargetFrameworkIdentifier" Value="$(NETCoreAppFrameworkIdentifier)" />
</Otherwise>
</Choose>
+ <!-- Detect framework pack suffix and apply defaults. -->
+ <PropertyGroup Condition="$(MSBuildProjectName.EndsWith('.Ref'))">
+ <IsTargetingPack>true</IsTargetingPack>
+
+ <!--
+ Prevent 'runtime.<rid>.Microsoft.<framework>.App.Ref' packages from being built.
+
+ Not the same as HasRuntimePackages, which is used to set up ProjectReferences on the runtime
+ packages and generate assets such as the platform manifest.
+ -->
+ <BuildRuntimePackages>false</BuildRuntimePackages>
+
+ <PackageType>DotnetPlatform</PackageType>
+ <Version>$(SharedFrameworkNugetVersion)</Version>
+
+ <!-- Include the platform manifest in the data dir. -->
+ <PlatformManifestTargetPath>data/PlatformManifest.txt</PlatformManifestTargetPath>
+ <FrameworkListTargetPath>data/</FrameworkListTargetPath>
+
+ <!-- Exclude runtime.json from the package. -->
+ <IncludeRuntimeJson>false</IncludeRuntimeJson>
+ <IsLineupPackage>false</IsLineupPackage>
+
+ <!-- Remove package dependencies. -->
+ <ExcludeLineupReference>true</ExcludeLineupReference>
+ <PackProjectDependencies>false</PackProjectDependencies>
+
+ <!-- Location to lay out pack contents. Used later to create installers. -->
+ <PackLayoutDir>$(IntermediateOutputPath)layout/</PackLayoutDir>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.depproj'">
+ <!-- we intentionally don't want to produce output -->
+ <OutputPath>unused</OutputPath>
+ <!--
+ we don't want any analyzers by ResolveNuGetPackageAssets
+ null-refs when this isn't set and an analyzer is in the packages
+ -->
+ <Language>unused</Language>
+ <NuGetTargetMoniker>$(NETCoreAppFrameworkMoniker)</NuGetTargetMoniker>
+ <NuGetTargetMonikerShort>$(NETCoreAppFramework)</NuGetTargetMonikerShort>
+ <PackageTargetFramework>$(NETCoreAppFramework)</PackageTargetFramework>
+ <CrossGenOutputPath>$(CrossGenRootPath)/$(MSBuildProjectName)/$(NuGetRuntimeIdentifier)</CrossGenOutputPath>
+ <ContainsPackageReferences>true</ContainsPackageReferences>
+ <RestorePackages>true</RestorePackages>
+ <RidSpecificAssets Condition="'$(NuGetRuntimeIdentifier)' != ''">true</RidSpecificAssets>
+ <IntermediateOutputPath>$(IntermediateOutputPath)$(NuGetRuntimeIdentifier)</IntermediateOutputPath>
+ <RestoreOutputPath>$(IntermediateOutputPath)</RestoreOutputPath>
+ <AdditionalRestoreArgs>/p:HasRuntimePackages=false /p:IntermediateOutputPath=$(IntermediateOutputPath)</AdditionalRestoreArgs>
+ <CrossGenSymbolsOutputPath>$(PackageSymbolsBinDir)/$(MSBuildProjectName)</CrossGenSymbolsOutputPath>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(IsFrameworkPackage)' == 'true'">
+ <Version>$(SharedFrameworkNugetVersion)</Version>
+ <OmitDependencies>true</OmitDependencies>
+ <SkipValidatePackage>true</SkipValidatePackage>
+ </PropertyGroup>
+
<!-- Add required legal files to packages -->
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
<File Condition="Exists('$(PackageLicenseFile)')"
</BuildRID>
<BuildRID Include="@(_buildingOnRID)"/>
</ItemGroup>
-
- <PropertyGroup>
- <_projectExtension Condition="Exists('$(MSBuildProjectName).pkgproj')">.pkgproj</_projectExtension>
- <_projectExtension Condition="'$(_projectExtension)' == '' AND Exists('$(MSBuildProjectName).depproj')">.depproj</_projectExtension>
- </PropertyGroup>
<ItemGroup Condition="'$(HasRuntimePackages)' != 'false'">
<_project Include="@(BuildRID)">
<AdditionalProperties>PackageTargetRuntime=%(Identity);NuGetRuntimeIdentifier=%(Identity);Platform=%(Platform)</AdditionalProperties>
</_project>
- <Project Include="@(_project->'$(MSBuildProjectName)$(_projectExtension)')" />
+ <RuntimeProject Include="@(_project->'$(MSBuildProjectFullPath)')" />
</ItemGroup>
<ItemGroup Condition="'$(PackageTargetRuntime)' == '' and '$(HasRuntimePackages)' != 'false'">
- <ProjectReference Include="@(Project)" />
- </ItemGroup>
+ <ProjectReference Include="@(RuntimeProject)" />
+ </ItemGroup>
+
</Project>
\ No newline at end of file
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.targets" />
+ <!--
+ Include common targets for specific project types. These files include BuildTools target
+ overrides that shouldn't be applied to other projects.
+ -->
+ <Import Project="framework.dependency.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'"/>
+ <Import Project="framework.packaging.targets" Condition="'$(IsFrameworkPackage)' == 'true'"/>
+
<UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
<UsingTask TaskName="GenerateFileVersionProps" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
</ItemGroup>
</Target>
- <Target Name="GetDependenciesToPackage"
+ <Target Name="GetNonPkgProjDependenciesToPackage"
Condition="'$(PackProjectDependencies)' == 'true'"
AfterTargets="ExpandProjectReferences">
<!-- allow projects to provide dependencies -->
<CreateFrameworkListFile
Files="@(File)"
TargetFile="$(FrameworkListFile)"
+ TargetFilePrefixes="ref/;runtimes/"
RootAttributes="@(FrameworkListRootAttributes)" />
<ItemGroup>
</ItemGroup>
</Target>
+ <!--
+ Copy the files in the package's data/ dir to a layout directory. This is what the targeting pack
+ installer will place in the dotnet install dir.
+
+ This extracts from the nupkg (zip) directly. An alternative would be using the PackageFile
+ items, but there's some risk of handling TargetPath metadata differently than NuGet does. Using
+ the nupkg directly ensures results are identical.
+ -->
+ <Target Name="CreateTargetingPackLayout"
+ AfterTargets="CreatePackage"
+ Condition="'$(IsTargetingPack)' == 'true'">
+ <PropertyGroup>
+ <TargetingPackNupkgFile>$(PackageOutputPath)$(Id).$(PackageVersion).nupkg</TargetingPackNupkgFile>
+ </PropertyGroup>
+
+ <ZipFileGetEntries TargetArchive="$(TargetingPackNupkgFile)">
+ <Output TaskParameter="Entries" ItemName="TargetingPackNupkgEntries" />
+ </ZipFileGetEntries>
+
+ <ItemGroup>
+ <TargetingPackDataEntries
+ Include="@(TargetingPackNupkgEntries)"
+ Condition="
+ $([System.String]::new('%(TargetingPackNupkgEntries.Identity)').StartsWith('data/')) OR
+ $([System.String]::new('%(TargetingPackNupkgEntries.Identity)').StartsWith('ref/')) OR
+ $([System.String]::new('%(TargetingPackNupkgEntries.Identity)').StartsWith('runtimes/'))" />
+ </ItemGroup>
+
+ <ZipFileExtractToDirectory
+ SourceArchive="$(TargetingPackNupkgFile)"
+ DestinationDirectory="$(PackLayoutDir)packs/$(Id)/$(Version)/"
+ OverwriteDestination="true"
+ Include="@(TargetingPackDataEntries)" />
+ </Target>
+
+ <!--
+ Get Project items: build the project, and build runtime packages if necessary. All projects in
+ this directory are ProjectProviders.
+ -->
+ <Target Name="GetProjectsToBuild" Returns="@(Project)">
+ <ItemGroup>
+ <Project Include="@(RuntimeProject)" Condition="'$(BuildRuntimePackages)' == 'true'" />
+ <Project Include="$(MSBuildProjectFullPath)" />
+ </ItemGroup>
+ </Target>
+
</Project>
\ No newline at end of file
<Import Project="$(MSBuildThisFileDirectory)..\dir.traversal.targets" />
- <Target Name="FilterProjects" BeforeTargets="Build">
- <Error Condition="'$(PackageRID)' == ''" Text="'PackageRID' property must be specified."/>
+ <!--
+ Some projects need to be built multiple times using different properties. Ask each
+ @(ProjectProvider) to give us the list of @(Project) items that need to be built. A pkgproj can
+ use this to build runtime packages, for example.
+ -->
+ <Target Name="ExpandProjects"
+ BeforeTargets="Build">
+ <MSBuild Projects="@(ProjectProvider)" Targets="GetProjectsToBuild">
+ <Output TaskParameter="TargetOutputs" ItemName="Project" />
+ </MSBuild>
+ </Target>
+
+ <!--
+ Filter runtime package builds down to the current RID and packages that aren't RID-specific.
+ -->
+ <Target Name="FilterProjects"
+ BeforeTargets="Build"
+ DependsOnTargets="ExpandProjects">
+ <Error Condition="'$(PackageRID)' == ''" Text="'PackageRID' property must be specified." />
<!-- Only build packages for current RID or non-RID-specific -->
<ItemGroup>
- <_projectsToBuild Include="@(Project)" Condition="'%(Project.PackageTargetRuntime)' == '$(PackageRID)' OR '%(Project.BuidOnRID)' == '$(PackageRID)' OR '%(Project.PackageTargetRuntime)' == ''" />
+ <_projectsToBuild
+ Include="@(Project)"
+ Condition="
+ '%(Project.PackageTargetRuntime)' == '$(PackageRID)' OR
+ '%(Project.BuidOnRID)' == '$(PackageRID)' OR
+ '%(Project.PackageTargetRuntime)' == ''" />
</ItemGroup>
<ItemGroup>
--- /dev/null
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!--
+ Shared targets specific to dependency projects (depproj).
+ -->
+
+ <!-- Fetches all the file items from the packages that we want to redist -->
+ <Target Name="GetFilesFromPackages">
+ <ItemGroup Condition="'$(NuGetRuntimeIdentifier)' != ''">
+ <!-- RID-specific: include all runtime files. -->
+ <FilesToPackage Include="@(ReferenceCopyLocalPaths)">
+ <!-- ResolveNugetPackageAssets doesn't preserve the asset type (native),
+ calculate it by looking for native in the path -->
+ <IsNative Condition="$([System.String]::new('%(Identity)').ToLowerInvariant().Replace('\', '/').Contains('/native/'))">true</IsNative>
+ </FilesToPackage>
+ <FilesToPackage>
+ <TargetPath Condition="'%(FilesToPackage.IsNative)' != 'true'">runtimes/$(NuGetRuntimeIdentifier)/lib/$(PackageTargetFramework)</TargetPath>
+ <TargetPath Condition="'%(FilesToPackage.IsNative)' == 'true'">runtimes/$(NuGetRuntimeIdentifier)/native</TargetPath>
+ </FilesToPackage>
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(NuGetRuntimeIdentifier)' == ''">
+ <!-- Not RID-specific: include all reference files. -->
+ <FilesToPackage Include="@(Reference)">
+ <TargetPath>ref/$(PackageTargetFramework)</TargetPath>
+ </FilesToPackage>
+
+ <!-- include all doc files -->
+ <_docFilesToPackage Include="%(FilesToPackage.RootDir)%(FilesToPackage.Directory)**\%(FilesToPackage.FileName).xml" />
+
+ <FilesToPackage Include="@(_docFilesToPackage)">
+ <TargetPath>ref/$(PackageTargetFramework)/%(RecursiveDir)</TargetPath>
+ </FilesToPackage>
+ </ItemGroup>
+
+ <!-- Add versions file with the hashes of the repos we consume -->
+ <ItemGroup>
+ <FilesToPackage Include="$(IntermediateOutputPath)\$(FrameworkPackageName).versions.txt">
+ <TargetPath></TargetPath>
+ </FilesToPackage>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="GetFilesToPackage"
+ DependsOnTargets="ResolveNuGetPackages;GetFilesFromPackages"
+ Returns="@(FilesToPackage)" />
+
+ <Target Name="GetDependenciesToPackage"
+ Condition="'@(DependenciesToPackage)' != ''"
+ DependsOnTargets="ResolveNuGetPackages"
+ Returns="@(_DependenciesToPackageWithVersion)">
+ <ItemGroup>
+ <!-- intersect ReferencedPackage with DependenciesToPackage -->
+ <_DependenciesToPackageWithVersion Include="@(PackageReference)" Condition="'@(PackageReference)' == '@(DependenciesToPackage)' AND '%(Identity)' != ''">
+ <TargetFramework>$(PackageTargetFramework)</TargetFramework>
+ </_DependenciesToPackageWithVersion>
+ </ItemGroup>
+
+ <Message Importance="low" Text="%(_DependenciesToPackageWithVersion.Identity) : %(_DependenciesToPackageWithVersion.Version) : %(_DependenciesToPackageWithVersion.TargetFramework)" />
+ </Target>
+
+ <!-- Creates the *.versions.txt file describing where data in this package came from. -->
+ <Target Name="GenerateHashVersionsFile" DependsOnTargets="GetDependencyVersionFiles">
+ <Error
+ Condition="!Exists('%(DependencyVersionFile.Identity)')"
+ Text="'%(Name)' version file does not exist: %(Identity)" />
+
+ <ItemGroup>
+ <DependencyVersionFile Content="$([System.IO.File]::ReadAllText('%(Identity)').Trim())" />
+
+ <_VersionsFileLines Include="core-setup $(LatestCommit)" />
+ <_VersionsFileLines Include="@(DependencyVersionFile ->'%(Name) %(Content)')" />
+ </ItemGroup>
+
+ <WriteLinesToFile Lines="@(_VersionsFileLines)"
+ File="$(IntermediateOutputPath)\$(FrameworkPackageName).versions.txt"
+ Overwrite="true"/>
+ </Target>
+
+ <!--
+ Stub DetermineRuntimeDependencies target so that when GenerateRuntimeDependencies builds this
+ target on the depproj, the build doesn't fail. BuildTools gives pkgproj a default implementation
+ that depproj doesn't get.
+ remove when fixing https://github.com/dotnet/buildtools/issues/1273
+ -->
+ <Target Name="DetermineRuntimeDependencies" />
+
+ <!-- Target overrides (can't be shared with pkgproj) -->
+
+ <Target Name="Build" DependsOnTargets="GenerateHashVersionsFile;GetFilesToPackage" />
+
+</Project>
--- /dev/null
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!--
+ Shared targets specific to projects building 'Microsoft.*.App*' packages.
+ -->
+
+ <!-- Target overrides (can't be shared with other package projects) -->
+
+ <Target Name="GetPackageReport" />
+
+</Project>
<?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" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
- <Version>$(SharedFrameworkNugetVersion)</Version>
- <OmitDependencies>true</OmitDependencies>
- <SkipValidatePackage>true</SkipValidatePackage>
- <ShouldCreateLayout>false</ShouldCreateLayout>
<PreventImplementationReference Condition="'$(PackageTargetRuntime)' != ''">true</PreventImplementationReference>
<BuildTargetPath>build/$(NETCoreAppFramework)</BuildTargetPath>
<PlatformManifestTargetPath>$(BuildTargetPath)</PlatformManifestTargetPath>
<!-- Identity / Reference package content -->
<ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
<!-- reference RID specific packages to generate lineup -->
- <ProjectReference Include="@(Project)" />
+ <ProjectReference Include="@(RuntimeProject)" />
<!-- references the host packages -->
<Dependency Include="Microsoft.NETCore.DotNetHostPolicy">
</File>
</ItemGroup>
- <!-- Redistributed package content from other nuget packages-->
- <ItemGroup>
- <ProjectReference Include="src\Microsoft.NETCore.App.depproj">
- <AdditionalProperties Condition="'$(PackageTargetRuntime)' != ''">NuGetRuntimeIdentifier=$(PackageTargetRuntime)</AdditionalProperties>
- </ProjectReference>
- </ItemGroup>
-
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-
- <Target Name="GetPackageReport" />
</Project>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <IsFrameworkPackage>true</IsFrameworkPackage>
+ </PropertyGroup>
+
+ <Import Project="..\..\dir.props" />
+
+ <!-- Redistribute package content from other nuget packages. -->
+ <ItemGroup>
+ <ProjectReference Include="..\src\netcoreapp.depproj">
+ <AdditionalProperties Condition="'$(PackageTargetRuntime)' != ''">NuGetRuntimeIdentifier=$(PackageTargetRuntime)</AdditionalProperties>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
<PropertyGroup>
- <!-- we intentionally don't want to produce output -->
- <OutputPath>unused</OutputPath>
- <!-- we don't want any analyzers by ResolveNuGetPackageAssets
- null-refs when this isn't set and an analyzer is in the packages -->
- <Language>unused</Language>
- <NuGetTargetMoniker>$(NETCoreAppFrameworkMoniker)</NuGetTargetMoniker>
- <NuGetTargetMonikerShort>$(NETCoreAppFramework)</NuGetTargetMonikerShort>
- <PackageTargetFramework>$(NETCoreAppFramework)</PackageTargetFramework>
- <PrimaryPackage>Microsoft.Private.CoreFx.NETCoreApp</PrimaryPackage>
- <CrossGenOutputPath>$(CrossGenRootPath)/$(MSBuildProjectName)/$(NuGetRuntimeIdentifier)</CrossGenOutputPath>
- <ContainsPackageReferences>true</ContainsPackageReferences>
- <RestorePackages>true</RestorePackages>
- <RidSpecificAssets Condition="'$(NuGetRuntimeIdentifier)' != ''">true</RidSpecificAssets>
- <IntermediateOutputPath>$(IntermediateOutputPath)$(NuGetRuntimeIdentifier)</IntermediateOutputPath>
- <RestoreOutputPath>$(IntermediateOutputPath)</RestoreOutputPath>
- <AdditionalRestoreArgs>/p:HasRuntimePackages=false /p:IntermediateOutputPath=$(IntermediateOutputPath)</AdditionalRestoreArgs>
- <CrossGenSymbolsOutputPath>$(PackageSymbolsBinDir)/$(MSBuildProjectName)</CrossGenSymbolsOutputPath>
+ <FrameworkPackageName>Microsoft.NETCore.App</FrameworkPackageName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NETStandard.Library">
<Version>$(NETStandardLibraryPackageVersion)</Version>
</PackageReference>
- <PackageReference Include="Microsoft.TargetingPack.Private.WinRT">
+ <PackageReference Include="$(MicrosoftTargetingPackPrivateWinRTPackage)" ExcludeAssets="All">
<Version>$(MicrosoftTargetingPackPrivateWinRTPackageVersion)</Version>
</PackageReference>
</ItemGroup>
<DependenciesToPackage Include="Microsoft.NETCore.Targets" />
</ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-
<!-- get paths from packages that are needed for cross-gen and other includes,
only relevant for runtime-specific builds -->
<Target Name="GetPackagePaths" Condition="'$(NuGetRuntimeIdentifier)' != ''" DependsOnTargets="ResolveNuGetPackages">
<_runtimeCoreLib Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == 'System.Private.CoreLib.dll'" />
<_runtimeJIT Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == '$(LibraryFilePrefix)clrjit$(LibraryFileExtension)'" />
<_fxSystemRuntime Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == 'System.Runtime.dll'" />
- <_windowsWinMD Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.FileName)%(ReferenceCopyLocalPaths.Extension)' == 'Windows.winmd'" />
+
+ <!-- Find Windows.winmd in package cache to allow ExcludeAssets=All. -->
+ <_windowsWinMD Include="$(PackagesDir)$(MicrosoftTargetingPackPrivateWinRTPackage.ToLowerInvariant())/$(MicrosoftTargetingPackPrivateWinRTPackageVersion)/**/Windows.winmd" />
</ItemGroup>
<PropertyGroup>
<Error Condition="!Exists('$(%(_requiredProperty.Identity))')" Text="Required property %(_requiredProperty.Identity) with value '$(%(_requiredProperty.Identity))' does not exist." />
</Target>
- <Target Name="GenerateHashVersionsFile" DependsOnTargets="GetPackagePaths;ResolveNuGetPackages">
- <PropertyGroup>
- <CoreFxVersionFile
- Condition="$([System.String]::new('%(Reference.Identity)').ToLowerInvariant().Contains('system.runtime.dll'))">
- $(PackagesDir)$([System.String]::new('%(Reference.NuGetPackageId)').ToLowerInvariant())/%(Reference.NuGetPackageVersion)/version.txt
- </CoreFxVersionFile>
- <CoreClrVersionFile Condition="'$(NuGetRuntimeIdentifier)' != ''">
- $(_runtimePackagePath)/version.txt
- </CoreClrVersionFile>
- </PropertyGroup>
- <ReadLinesFromFile File="$(CoreFxVersionFile)" Condition="Exists('$(CoreFxVersionFile)')">
- <Output TaskParameter="Lines" PropertyName="CoreFxHash" />
- </ReadLinesFromFile>
- <ReadLinesFromFile File="$(CoreClrVersionFile)" Condition="Exists('$(CoreClrVersionFile)')">
- <Output TaskParameter="Lines" PropertyName="CoreClrHash" />
- </ReadLinesFromFile>
-
- <Error Condition="!Exists('$(CoreFxVersionFile)')" Text="Failed to find the corefx version.txt file at $(CoreFxVersionFile)" />
-
+ <Target Name="GetDependencyVersionFiles" DependsOnTargets="GetPackagePaths;ResolveNuGetPackages">
<ItemGroup>
- <_VersionsFileLines Include="core-setup $(LatestCommit)" />
- <_VersionsFileLines Include="corefx $(CoreFxHash)" />
- <_VersionsFileLines Include="dotnet/versions/corefx $(CoreFxCurrentRef)" />
- <_VersionsFileLines Include="coreclr $(CoreClrHash)" Condition="'$(CoreClrHash)'!=''" />
- <_VersionsFileLines Include="dotnet/versions/coreclr $(CoreClrCurrentRef)" Condition="'$(CoreClrHash)'!=''" />
+ <_coreFxVersionFile
+ Include="$(PackagesDir)$([System.String]::new('%(Reference.NuGetPackageId)').ToLowerInvariant())/%(Reference.NuGetPackageVersion)/version.txt"
+ Condition="$([System.String]::new('%(Reference.Identity)').ToLowerInvariant().Contains('system.runtime.dll'))"
+ Name="corefx" />
+ <_coreClrVersionFile
+ Include="$(_runtimePackagePath)/version.txt"
+ Condition="'$(NuGetRuntimeIdentifier)' != ''"
+ Name="coreclr" />
+
+ <DependencyVersionFile Include="@(_coreFxVersionFile);@(_coreClrVersionFile)" />
</ItemGroup>
- <WriteLinesToFile Lines="@(_VersionsFileLines)"
- File="$(IntermediateOutputPath)\Microsoft.NETCore.App.versions.txt"
- Overwrite="true"/>
+ <Error
+ Condition="'@(_coreFxVersionFile)' == ''"
+ Text="Failed to locate corefx version.txt file." />
+
+ <Error
+ Condition="'@(_coreClrVersionFile)' == '' AND '$(NuGetRuntimeIdentifier)' != ''"
+ Text="Failed to locate coreclr version.txt file." />
</Target>
- <!-- Fetches all the file items from the packages that we want to redist -->
- <Target Name="GetFilesFromPackages" DependsOnTargets="GetPackagePaths">
+ <!-- Fetches all the runtime items from the packages that we want to redist -->
+ <Target Name="GetRuntimeFilesFromPackages" DependsOnTargets="GetPackagePaths">
<ItemGroup Condition="'$(NuGetRuntimeIdentifier)' != ''">
- <!-- RID-specific: include all runtime files except files in Microsoft.TargetingPack.Private.WinRT -->
- <FilesToPackage Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != 'Microsoft.TargetingPack.Private.WinRT'">
- <!-- ResolveNugetPackageAssets doesn't preserve the asset type (native),
- calculate it by looking for native in the path -->
- <IsNative Condition="$([System.String]::new('%(Identity)').ToLowerInvariant().Replace('\', '/').Contains('/native/'))">true</IsNative>
- </FilesToPackage>
- <FilesToPackage>
- <TargetPath Condition="'%(FilesToPackage.IsNative)' != 'true'">runtimes/$(NuGetRuntimeIdentifier)/lib/$(PackageTargetFramework)</TargetPath>
- <TargetPath Condition="'%(FilesToPackage.IsNative)' == 'true'">runtimes/$(NuGetRuntimeIdentifier)/native</TargetPath>
- </FilesToPackage>
<_ToolsToPackage Include="$(_runtimePackagePath)/tools/**/*.*"/>
<FilesToPackage Include="@(_ToolsToPackage)">
<NuGetPackageId>$(_runtimePackageId)</NuGetPackageId>
<IsNative>true</IsNative>
</FilesToPackage>
</ItemGroup>
-
- <ItemGroup Condition="'$(NuGetRuntimeIdentifier)' == ''">
- <!-- Not RID-specific: include all reference files except files in Microsoft.TargetingPack.Private.WinRT -->
- <FilesToPackage Include="@(Reference)" Condition="'%(Reference.NuGetPackageId)' != 'Microsoft.TargetingPack.Private.WinRT'">
- <TargetPath>ref/$(PackageTargetFramework)</TargetPath>
- </FilesToPackage>
-
- <!-- include all doc files -->
- <_docFilesToPackage Include="%(FilesToPackage.RootDir)%(FilesToPackage.Directory)**\%(FilesToPackage.FileName).xml" />
-
- <FilesToPackage Include="@(_docFilesToPackage)">
- <TargetPath>ref/$(PackageTargetFramework)/%(RecursiveDir)</TargetPath>
- </FilesToPackage>
- </ItemGroup>
-
- <ItemGroup Condition="'$(IncludeSourceFilesInPackage)' == 'true'">
- <!-- pick up any src our sources directory from packages contributing files -->
- <_sourcePathCandidate Include="@(FilesToPackage->'$(PackagesDir)\%(NuGetPackageId)\%(NuGetPackageVersion)\sources')" />
- <_sourcePathCandidate Include="@(FilesToPackage->'$(PackagesDir)\%(NuGetPackageId)\%(NuGetPackageVersion)\src')" />
- <_sourcePath Include="@(_sourcePathCandidate)" Condition="Exists('%(Identity)')" />
- </ItemGroup>
-
- <!-- Add versions file with the hashes of the repos we consume -->
- <ItemGroup>
- <FilesToPackage Include="$(IntermediateOutputPath)\Microsoft.NETCore.App.versions.txt">
- <TargetPath></TargetPath>
- </FilesToPackage>
- </ItemGroup>
-
- <!-- on windows workaround max-path -->
- <!-- this can be removed once we build on core MSBuild which supports long paths. -->
- <ItemGroup Condition="'$(OsEnvironment)'=='Windows_NT'">
- <!-- choose a shorter path name, excluding package version -->
- <_shortSourcePath Include="@(_sourcePath->'$(ObjDir.Replace('/', '\'))src-%(NuGetPackageId)')">
- <Original>%(_sourcePath.FullPath)</Original>
- </_shortSourcePath>
- <_sourcePath Remove="@(_sourcePath)" />
- <_sourcePath Include="@(_shortSourcePath)" />
- </ItemGroup>
- <RemoveDir Condition="'@(_shortSourcePath)' != '' AND Exists('%(_shortSourcePath.Identity)')" Directories="%(_shortSourcePath.Identity)" />
- <Exec Condition="'@(_shortSourcePath)' != ''" Command="mklink /J %(_shortSourcePath.Identity) %(_shortSourcePath.Original)" />
-
- <ItemGroup>
- <FilesToPackage Include="%(_sourcePath.Identity)\%2A%2A\%2A.%2A">
- <TargetPath>src</TargetPath>
- <IsSourceCodeFile>true</IsSourceCodeFile>
- </FilesToPackage>
- </ItemGroup>
</Target>
<!-- Prepares all items for cross-gen and replaces package file items with their cross-gen'ed equivalents -->
</Target>
<Target Name="CrossGen"
+ BeforeTargets="Build"
DependsOnTargets="CreateCrossGenImages;CreateCrossGenSymbols" />
<Target Name="CreateCrossGenImages"
</ItemGroup>
</Target>
- <Target Name="GetFilesToPackage"
- DependsOnTargets="ResolveNuGetPackages;GetFilesFromPackages;PrepareForCrossGen;GetCrossGenSymbolsFiles"
- Returns="@(FilesToPackage)" />
-
- <Target Name="GetDependenciesToPackage" Condition="'@(DependenciesToPackage)' != ''" DependsOnTargets="ResolveNuGetPackages" Returns="@(_DependenciesToPackageWithVersion)">
- <ItemGroup>
- <!-- intersect ReferencedPackage with DependenciesToPackage -->
- <_DependenciesToPackageWithVersion Include="@(PackageReference)" Condition="'@(PackageReference)' == '@(DependenciesToPackage)' AND '%(Identity)' != ''">
- <TargetFramework>$(PackageTargetFramework)</TargetFramework>
- </_DependenciesToPackageWithVersion>
- </ItemGroup>
-
- <Message Importance="low" Text="%(_DependenciesToPackageWithVersion.Identity) : %(_DependenciesToPackageWithVersion.Version) : %(_DependenciesToPackageWithVersion.TargetFramework)" />
+ <Target Name="GetRuntimeFilesToPackage"
+ BeforeTargets="GetFilesToPackage"
+ DependsOnTargets="GetRuntimeFilesFromPackages;PrepareForCrossGen;GetCrossGenSymbolsFiles">
</Target>
- <!-- Run crossgen -->
- <Target Name="Build" DependsOnTargets="GenerateHashVersionsFile;CrossGen;GetFilesToPackage" />
-
- <!-- remove when fixing https://github.com/dotnet/buildtools/issues/1273 -->
- <Target Name="DetermineRuntimeDependencies" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
- <Project Include="$(MSBuildProjectName).depproj" />
+ <ProjectProvider Include="**\*.pkgproj" Exclude="@(ProjectExclusions)" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
- <Project Include="$(MSBuildProjectName).pkgproj" />
+ <ProjectProvider Include="**\*.depproj" Exclude="@(ProjectExclusions)" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
<?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" />
-
- <!-- We always build the identity/redirection package. However, the platform specific runtime-*.nupkg is built based upon the target OS we are building the product for. -->
- <ItemGroup>
- <Project Include="$(MSBuildProjectName).pkgproj" />
- </ItemGroup>
-
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <IsFrameworkPackage>true</IsFrameworkPackage>
+ </PropertyGroup>
+
+ <Import Project="..\..\dir.props" />
+
+ <!-- Redistribute package content from other nuget packages. -->
+ <ItemGroup>
+ <ProjectReference Include="..\src\windowsdesktop.depproj">
+ <AdditionalProperties Condition="'$(PackageTargetRuntime)' != ''">NuGetRuntimeIdentifier=$(PackageTargetRuntime)</AdditionalProperties>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
+ <PropertyGroup>
+ <FrameworkPackageName>Microsoft.WindowsDesktop.App</FrameworkPackageName>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.WindowsDesktop.App">
+ <Version>$(MicrosoftWindowsDesktopAppPackageVersion)</Version>
+ </PackageReference>
+ </ItemGroup>
+
+ <Target Name="GetDependencyVersionFiles" DependsOnTargets="ResolveNuGetPackages">
+ <ItemGroup>
+ <DependencyVersionFile
+ Include="$(PackagesDir)$([System.String]::new('%(Reference.NuGetPackageId)').ToLowerInvariant())/%(Reference.NuGetPackageVersion)/version.txt"
+ Condition="$([System.String]::new('%(Reference.Identity)').ToLowerInvariant().Contains('system.xaml.dll'))"
+ Name="dotnet-trusted" />
+ </ItemGroup>
+ </Target>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
<ItemGroup>
<Project Include="$(MSBuildThisFileDirectory)corehost/build.proj" />
<Project Include="$(MSBuildThisFileDirectory)managed/dir.proj" />
- <Project Include="$(MSBuildThisFileDirectory)pkg/**/src/*.builds" />
+ <Project Include="$(MSBuildThisFileDirectory)pkg/projects/src.builds" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
[Required]
public string TargetFile { get; set; }
+ public string[] TargetFilePrefixes { get; set; }
+
/// <summary>
/// Extra attributes to place on the root node.
///
foreach (var f in Files
.Where(item =>
- item.GetMetadata("TargetPath")?.StartsWith("data/") == true &&
+ IsTargetPathIncluded(item) &&
item.ItemSpec.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
.Select(item => new
{
return !Log.HasLoggedErrors;
}
+
+ private bool IsTargetPathIncluded(ITaskItem item)
+ {
+ return TargetFilePrefixes
+ ?.Any(prefix => item.GetMetadata("TargetPath")?.StartsWith(prefix) == true) ?? true;
+ }
}
}