dotnet-installer/src/redist/targets/Crossgen.targets
dotnet-maestro[bot] 96acacb9d4
[release/5.0.1xx-rc2] Update dependencies from dotnet/sdk (#8404)
[release/5.0.1xx-rc2] Update dependencies from dotnet/sdk
- Coherency Updates:
  - Microsoft.WindowsDesktop.App.Ref: from 5.0.0-rc.1.20431.13 to 5.0.0-rc.2.20454.1 (parent: Microsoft.NET.Sdk)
  - Microsoft.WindowsDesktop.App: from 5.0.0-rc.1.20431.13 to 5.0.0-rc.2.20454.1 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Ref: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Internal: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Runtime.win-x64: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Host.win-x64: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.DotNetHostResolver: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.Platforms: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25 (parent: Microsoft.NET.Sdk)
  - Microsoft.AspNetCore.App.Ref: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.AspNetCore.App.Runtime.win-x64: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3 (parent: Microsoft.NET.Sdk)
  - dotnet-dev-certs: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3 (parent: Microsoft.NET.Sdk)
  - dotnet-user-secrets: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3 (parent: Microsoft.NET.Sdk)
  - dotnet-watch: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.Dotnet.WinForms.ProjectTemplates: from 5.0.0-rc.1.20431.1 to 5.0.0-rc.1.20451.14 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)
  - Microsoft.WindowsDesktop.App.Runtime.win-x64: from 5.0.0-rc.1.20431.13 to 5.0.0-rc.2.20454.1 (parent: Microsoft.NET.Sdk)
  - Microsoft.DotNet.Wpf.ProjectTemplates: from 5.0.0-rc.1.20431.2 to 5.0.0-rc.2.20452.6 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)
  - Microsoft.FSharp.Compiler: from 11.0.0-beta.20428.2 to 11.0.0-beta.20457.3 (parent: Microsoft.NET.Sdk)
  - Microsoft.NET.Test.Sdk: from 16.8.0-release-20200828-02 to 16.8.0-release-20200902-05 (parent: Microsoft.NET.Sdk)
  - Microsoft.Net.Compilers.Toolset: from 3.8.0-3.20420.1 to 3.8.0-3.20454.4 (parent: Microsoft.NET.Sdk)
  - Microsoft.Build: from 16.8.0-preview-20429-01 to 16.8.0-preview-20454-01 (parent: Microsoft.NET.Sdk)
  - NuGet.Build.Tasks: from 5.8.0-preview.3.6783 to 5.8.0-preview.3.6812 (parent: Microsoft.NET.Sdk)
  - Microsoft.DotNet.Cli.CommandLine: from 1.0.0-preview.19208.1 to 1.0.0-preview.19208.1 (parent: Microsoft.NET.Sdk)

- Updates:
  - Microsoft.NET.Sdk: from 5.0.100-rc.1.20451.7 to 5.0.100-rc.2.20458.1
  - Microsoft.DotNet.MSBuildSdkResolver: from 5.0.100-rc.1.20451.7 to 5.0.100-rc.2.20458.1
  - Microsoft.WindowsDesktop.App.Ref: from 5.0.0-rc.1.20431.13 to 5.0.0-rc.2.20454.1
  - Microsoft.WindowsDesktop.App: from 5.0.0-rc.1.20431.13 to 5.0.0-rc.2.20454.1
  - Microsoft.NETCore.App.Ref: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25
  - Microsoft.NETCore.App.Internal: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25
  - Microsoft.NETCore.App.Runtime.win-x64: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25
  - Microsoft.NETCore.App.Host.win-x64: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25
  - Microsoft.NETCore.DotNetHostResolver: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25
  - Microsoft.NETCore.Platforms: from 5.0.0-rc.1.20431.14 to 5.0.0-rc.2.20454.25
  - Microsoft.AspNetCore.App.Ref: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3
  - Microsoft.AspNetCore.App.Runtime.win-x64: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3
  - VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3
  - dotnet-dev-certs: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3
  - dotnet-user-secrets: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3
  - dotnet-watch: from 5.0.0-rc.1.20451.2 to 5.0.0-rc.2.20456.3
  - Microsoft.Dotnet.WinForms.ProjectTemplates: from 5.0.0-rc.1.20431.1 to 5.0.0-rc.1.20451.14
  - Microsoft.WindowsDesktop.App.Runtime.win-x64: from 5.0.0-rc.1.20431.13 to 5.0.0-rc.2.20454.1
  - Microsoft.DotNet.Wpf.ProjectTemplates: from 5.0.0-rc.1.20431.2 to 5.0.0-rc.2.20452.6
  - Microsoft.FSharp.Compiler: from 11.0.0-beta.20428.2 to 11.0.0-beta.20457.3
  - Microsoft.NET.Test.Sdk: from 16.8.0-release-20200828-02 to 16.8.0-release-20200902-05
  - Microsoft.Net.Compilers.Toolset: from 3.8.0-3.20420.1 to 3.8.0-3.20454.4
  - Microsoft.Build: from 16.8.0-preview-20429-01 to 16.8.0-preview-20454-01
  - NuGet.Build.Tasks: from 5.8.0-preview.3.6783 to 5.8.0-preview.3.6812
  - Microsoft.DotNet.Cli.CommandLine: from 1.0.0-preview.19208.1 to 1.0.0-preview.19208.1

 - Exclusing all reference assemblies from crossgen

 - Removing extra /
2020-09-08 17:10:14 +00:00

165 lines
9.3 KiB
XML

<Project>
<Target Name="CrossgenLayout"
Condition="'$(DISABLE_CROSSGEN)' == ''"
DependsOnTargets="SetSdkBrandingInfo">
<PropertyGroup>
<RuntimeNETCoreAppPackageName>microsoft.netcore.app.runtime.$(SharedFrameworkRid)</RuntimeNETCoreAppPackageName>
<_crossDir Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">/x64_arm64</_crossDir>
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">/x86_arm</_crossDir>
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">/x64_arm</_crossDir>
<CrossgenPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppRuntimePackageVersion)/tools$(_crossDir)/crossgen$(ExeExtension)</CrossgenPath>
<LibCLRJitRid Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' == 'x64'">x64_arm64</LibCLRJitRid>
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">x86_arm</LibCLRJitRid>
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">x64_arm</LibCLRJitRid>
<LibCLRJitRid Condition="'$(LibCLRJitRid)' == ''">$(SharedFrameworkRid)</LibCLRJitRid>
<LibCLRJitPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppRuntimePackageVersion)/runtimes/$(LibCLRJitRid)/native/$(DynamicLibPrefix)clrjit$(DynamicLibExtension)</LibCLRJitPath>
<SharedFrameworkNameVersionPath>$(RedistLayoutPath)shared/$(SharedFrameworkName)/$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedFrameworkNameVersionPath>
<DIASymReaderCrossgenFilter>*</DIASymReaderCrossgenFilter>
<DIASymReaderCrossgenFilter Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">x86</DIASymReaderCrossgenFilter>
<DIASymReaderCrossgenFilter Condition="'$(Architecture)' == 'arm64' And '$(OSName)' == 'win'">amd64</DIASymReaderCrossgenFilter>
</PropertyGroup>
<!-- Download the runtime package with the crossgen executable in it -->
<ItemGroup>
<CrossGenDownloadPackageProject Include="$(MSBuildThisFileDirectory)DownloadPackage.csproj">
<Properties>
PackageToRestore=$(RuntimeNETCoreAppPackageName);
PackageVersionToRestore=$(MicrosoftNETCoreAppRuntimePackageVersion);
TargetFramework=$(TargetFramework)
</Properties>
</CrossGenDownloadPackageProject>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(CrossGenDownloadPackageProject)">
</MSBuild>
<ItemGroup>
<RoslynFiles Include="$(SdkOutputDirectory)Roslyn\bincore\**\*" />
<FSharpFilesRuntimes Include="$(SdkOutputDirectory)FSharp\runtimes\**\*" />
<FSharpFilesRoot Include="$(SdkOutputDirectory)FSharp\**\*" Exclude="$(SdkOutputDirectory)FSharp\FSharp.Build.dll;@(FSharpFilesRuntimes)" />
<FSharpFiles Include="@(FSharpFilesRuntimes);@(FSharpFilesRoot)" />
<RemainingFiles Include="$(SdkOutputDirectory)**\*" Exclude="$(SdkOutputDirectory)FSharp\FSharp.Build.dll;@(RoslynFiles);@(FSharpFiles)" />
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error -->
<RemainingFiles Remove="$(SdkOutputDirectory)TestHost*\**\*" />
<RemainingFiles Remove="$(SdkOutputDirectory)Sdks\**\*" />
<RemainingFiles Remove="$(SdkOutputDirectory)**\Microsoft.TestPlatform.Extensions.EventLogCollector.dll" />
<!-- Add back the .NET Core assemblies in the Sdks folder -->
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\netcoreapp*\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\netcoreapp*\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tools\netcoreapp*\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\netcoreapp*\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\ILLink.Tasks\tools\netcoreapp*\**\*" />
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Publish\tools\netcoreapp*\**\*" />
<!-- Don't try to CrossGen .NET Framework support assemblies for .NET Standard -->
<RemainingFiles Remove="$(SdkOutputDirectory)Microsoft\Microsoft.NET.Build.Extensions\net*\**\*" />
<!-- Don't CrossGen bundled DotnetTools -->
<RemainingFiles Remove="$(SdkOutputDirectory)DotnetTools\**\*" />
<!-- Don't crossgen satellite assemblies -->
<RoslynFiles Remove="$(SdkOutputDirectory)Roslyn\bincore\**\*.resources.dll" />
<FSharpFiles Remove="$(SdkOutputDirectory)FSharp\**\*.resources.dll" />
<RemainingFiles Remove="$(SdkOutputDirectory)**\*.resources.dll" />
<!-- Don't crossgen reference assemblies redisted with msbuild for RoslynCodeTaskFactory -->
<RemainingFiles Remove="$(SdkOutputDirectory)**\ref\*.dll" />
<DiasymReaderPath Include="$(SharedFrameworkNameVersionPath)/Microsoft.DiaSymReader.Native.$(DIASymReaderCrossgenFilter).dll" />
</ItemGroup>
<AddMetadataIsPE Items="@(RoslynFiles)">
<Output TaskParameter="ResultItems" ItemName="RoslynFilesWithPEMarker" />
</AddMetadataIsPE>
<AddMetadataIsPE Items="@(FSharpFiles)">
<Output TaskParameter="ResultItems" ItemName="FSharpFilesWithPEMarker" />
</AddMetadataIsPE>
<AddMetadataIsPE Items="@(RemainingFiles)">
<Output TaskParameter="ResultItems" ItemName="RemainingFilesWithPEMarker" />
</AddMetadataIsPE>
<ItemGroup>
<RoslynTargets Include="%(RoslynFilesWithPEMarker.FullPath)" Condition=" '%(RoslynFilesWithPEMarker.IsPE)' == 'True' " />
<FSharpTargets Include="%(FSharpFilesWithPEMarker.FullPath)" Condition=" '%(FSharpFilesWithPEMarker.IsPE)' == 'True' " />
<RemainingTargets Include="%(RemainingFilesWithPEMarker.FullPath)" Condition=" '%(RemainingFilesWithPEMarker.IsPE)' == 'True' " />
<RoslynFolders Include="@(RoslynTargets-&gt;DirectoryName()-&gt;Distinct())" />
<FSharpFolders Include="@(FSharpTargets-&gt;DirectoryName()-&gt;Distinct())" />
<RemainingFolders Include="@(RemainingTargets-&gt;DirectoryName()-&gt;Distinct())" />
<!-- FSharp.Build.dll causes the FSharp folder to be included. Remove it, as we don't want other FSharp dlls being included in the crossgen. -->
<RemainingFolders Remove="$(PublishDir)FSharp\**\*" />
<!-- RemainingFolders should be ordered so that dependencies are first looked up in the leaf folders.
Currently it is not ordered and crossgen is picking the wrong dlls when resolving dependencies: https://github.com/dotnet/core-sdk/pull/6774
As a partial solution, we remove the root folder from the list and put it back to the end.
Remove the following 2 lines when resolving this issue: https://github.com/dotnet/core-sdk/issues/6877 -->
<RemainingFolders Remove="$(SdkOutputDirectory.TrimEnd('\').TrimEnd('/'))" />
<RemainingFolders Include="$(SdkOutputDirectory.TrimEnd('\').TrimEnd('/'))" />
</ItemGroup>
<!-- Crossgen does not support generating symbols on Mac -->
<PropertyGroup Condition="'$(CreateCrossgenSymbols)' == ''">
<CreateCrossgenSymbols>true</CreateCrossgenSymbols>
<CreateCrossgenSymbols Condition="'$(OSName)' == 'osx'">false</CreateCrossgenSymbols>
<CreateCrossgenSymbols Condition="'$(OSName)' == 'freebsd'">false</CreateCrossgenSymbols>
</PropertyGroup>
<Crossgen
SourceAssembly="%(RoslynTargets.FullPath)"
DestinationPath="%(RoslynTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
CreateSymbols="$(CreateCrossgenSymbols)"
DiasymReaderPath="@(DiasymReaderPath)"
PlatformAssemblyPaths="@(RoslynFolders);$(SharedFrameworkNameVersionPath)" />
<Crossgen
SourceAssembly="%(FSharpTargets.FullPath)"
DestinationPath="%(FSharpTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
CreateSymbols="$(CreateCrossgenSymbols)"
DiasymReaderPath="@(DiasymReaderPath)"
PlatformAssemblyPaths="@(FSharpFolders);$(SharedFrameworkNameVersionPath)" />
<Crossgen
SourceAssembly="%(RemainingTargets.FullPath)"
DestinationPath="%(RemainingTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
CreateSymbols="$(CreateCrossgenSymbols)"
DiasymReaderPath="@(DiasymReaderPath)"
PlatformAssemblyPaths="@(RemainingFolders);$(SharedFrameworkNameVersionPath)" />
<ItemGroup>
<PdbsToMove Include="$(SdkOutputDirectory)**/*.pdb" />
<PdbsToMove Include="$(SdkOutputDirectory)**/*.ni.*.map" />
</ItemGroup>
<!-- Move symbols to separate folder, they are not included in the layout but are published separately -->
<Move SourceFiles="@(PdbsToMove)"
DestinationFiles="@(PdbsToMove->'$(ArtifactsSymStoreDirectory)/sdk/$(Version)/%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="ChmodLayout"
AfterTargets="CrossgenLayout"
Condition=" '$(OSName)' != 'win' ">
<Exec Command="find $(SdkOutputDirectory) -type d -exec chmod 755 {} \;" />
<Exec Command="find $(SdkOutputDirectory) -type f -exec chmod 644 {} \;" />
</Target>
</Project>