2018-12-04 02:15:31 +00:00
|
|
|
<Project>
|
|
|
|
<Target Name="CrossgenLayout"
|
2020-03-30 21:28:22 +00:00
|
|
|
Condition="'$(DISABLE_CROSSGEN)' == ''"
|
2018-12-04 02:15:31 +00:00
|
|
|
DependsOnTargets="SetSdkBrandingInfo">
|
|
|
|
|
|
|
|
<PropertyGroup>
|
Prepare for 3.0.1xx servicing
We were bumping targeting pack, framework-dependent default
runtime version, and self-contained default (latest) runtime
version in unison. This only works for previews where these
versions are all the same always. Now that we're servicing 3.0,
we:
1. Pin targeting packs to 3.0.0
2. Fix default framework-dependent runtime version at 3.0.0
This change also:
* Removes dependencies on legacy/internal netcoreapp packages. We
now use Microsoft.NETCore.App.Internal version exclusively to
calculate the blob storage path for core-setup.
* Uses PackageDownload for all templates, including
latest. PackageReference had been used for latest only because
it hid another bug with the netcoreapp reference of
redist.csproj that is fixed here. That reference is now a
FrameworkReference as it should be.
* Removes a bunch of shenanigans from
GenerateBundledVersions.props that were causing issues with
above. One casualty of that is that we hard code the RID lists
for runtime pack, which I don't think is too bad, and actually
will make it easier to merge in source build patches.
* Cleans up how runtime and targeting pack versions are
referenced throughout, removing incorrect assumptions about
them being the same.
* Incorporates a prior closed PR to use suffixed version for blob
storage, even when assets coming from blob storage are
stabilized. It needed changes to merge with this.
Note:
* A similar theoretical servicing issue exists for the versions
of apphost, hostfxr, shared host, which are still assumed to be
the same as the runtime version in several places. If we choose
to service those independently, more work is required.
* There will be a 3.0.1 ASP.NET targeting pack, and so we will
have to unpin that once it is ready. This change establishes
the baseline of all targeting packs being pinnned, and they can
be unpinned in the (hopefully rare) cases where they need to be
serviced.
2019-10-03 17:33:20 +00:00
|
|
|
<RuntimeNETCoreAppPackageName>microsoft.netcore.app.runtime.$(SharedFrameworkRid)</RuntimeNETCoreAppPackageName>
|
2019-11-07 16:33:59 +00:00
|
|
|
<_crossDir Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">/x64_arm64</_crossDir>
|
2018-12-04 02:15:31 +00:00
|
|
|
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">/x86_arm</_crossDir>
|
|
|
|
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">/x64_arm</_crossDir>
|
Prepare for 3.0.1xx servicing
We were bumping targeting pack, framework-dependent default
runtime version, and self-contained default (latest) runtime
version in unison. This only works for previews where these
versions are all the same always. Now that we're servicing 3.0,
we:
1. Pin targeting packs to 3.0.0
2. Fix default framework-dependent runtime version at 3.0.0
This change also:
* Removes dependencies on legacy/internal netcoreapp packages. We
now use Microsoft.NETCore.App.Internal version exclusively to
calculate the blob storage path for core-setup.
* Uses PackageDownload for all templates, including
latest. PackageReference had been used for latest only because
it hid another bug with the netcoreapp reference of
redist.csproj that is fixed here. That reference is now a
FrameworkReference as it should be.
* Removes a bunch of shenanigans from
GenerateBundledVersions.props that were causing issues with
above. One casualty of that is that we hard code the RID lists
for runtime pack, which I don't think is too bad, and actually
will make it easier to merge in source build patches.
* Cleans up how runtime and targeting pack versions are
referenced throughout, removing incorrect assumptions about
them being the same.
* Incorporates a prior closed PR to use suffixed version for blob
storage, even when assets coming from blob storage are
stabilized. It needed changes to merge with this.
Note:
* A similar theoretical servicing issue exists for the versions
of apphost, hostfxr, shared host, which are still assumed to be
the same as the runtime version in several places. If we choose
to service those independently, more work is required.
* There will be a 3.0.1 ASP.NET targeting pack, and so we will
have to unpin that once it is ready. This change establishes
the baseline of all targeting packs being pinnned, and they can
be unpinned in the (hopefully rare) cases where they need to be
serviced.
2019-10-03 17:33:20 +00:00
|
|
|
<CrossgenPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppRuntimePackageVersion)/tools$(_crossDir)/crossgen$(ExeExtension)</CrossgenPath>
|
2019-11-07 16:33:59 +00:00
|
|
|
<LibCLRJitRid Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' == 'x64'">x64_arm64</LibCLRJitRid>
|
2018-12-04 02:15:31 +00:00
|
|
|
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">x86_arm</LibCLRJitRid>
|
|
|
|
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">x64_arm</LibCLRJitRid>
|
2019-11-07 16:33:59 +00:00
|
|
|
<LibCLRJitRid Condition="'$(LibCLRJitRid)' == ''">$(SharedFrameworkRid)</LibCLRJitRid>
|
Prepare for 3.0.1xx servicing
We were bumping targeting pack, framework-dependent default
runtime version, and self-contained default (latest) runtime
version in unison. This only works for previews where these
versions are all the same always. Now that we're servicing 3.0,
we:
1. Pin targeting packs to 3.0.0
2. Fix default framework-dependent runtime version at 3.0.0
This change also:
* Removes dependencies on legacy/internal netcoreapp packages. We
now use Microsoft.NETCore.App.Internal version exclusively to
calculate the blob storage path for core-setup.
* Uses PackageDownload for all templates, including
latest. PackageReference had been used for latest only because
it hid another bug with the netcoreapp reference of
redist.csproj that is fixed here. That reference is now a
FrameworkReference as it should be.
* Removes a bunch of shenanigans from
GenerateBundledVersions.props that were causing issues with
above. One casualty of that is that we hard code the RID lists
for runtime pack, which I don't think is too bad, and actually
will make it easier to merge in source build patches.
* Cleans up how runtime and targeting pack versions are
referenced throughout, removing incorrect assumptions about
them being the same.
* Incorporates a prior closed PR to use suffixed version for blob
storage, even when assets coming from blob storage are
stabilized. It needed changes to merge with this.
Note:
* A similar theoretical servicing issue exists for the versions
of apphost, hostfxr, shared host, which are still assumed to be
the same as the runtime version in several places. If we choose
to service those independently, more work is required.
* There will be a 3.0.1 ASP.NET targeting pack, and so we will
have to unpin that once it is ready. This change establishes
the baseline of all targeting packs being pinnned, and they can
be unpinned in the (hopefully rare) cases where they need to be
serviced.
2019-10-03 17:33:20 +00:00
|
|
|
<LibCLRJitPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppRuntimePackageVersion)/runtimes/$(LibCLRJitRid)/native/$(DynamicLibPrefix)clrjit$(DynamicLibExtension)</LibCLRJitPath>
|
|
|
|
<SharedFrameworkNameVersionPath>$(RedistLayoutPath)shared/$(SharedFrameworkName)/$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedFrameworkNameVersionPath>
|
2018-12-21 04:43:20 +00:00
|
|
|
<DIASymReaderCrossgenFilter>*</DIASymReaderCrossgenFilter>
|
|
|
|
<DIASymReaderCrossgenFilter Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">x86</DIASymReaderCrossgenFilter>
|
2020-03-30 21:28:22 +00:00
|
|
|
<DIASymReaderCrossgenFilter Condition="'$(Architecture)' == 'arm64' And '$(OSName)' == 'win'">amd64</DIASymReaderCrossgenFilter>
|
2018-12-04 02:15:31 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<!-- Download the runtime package with the crossgen executable in it -->
|
|
|
|
<ItemGroup>
|
2018-12-04 02:58:43 +00:00
|
|
|
<CrossGenDownloadPackageProject Include="$(MSBuildThisFileDirectory)DownloadPackage.csproj">
|
2018-12-04 02:15:31 +00:00
|
|
|
<Properties>
|
|
|
|
PackageToRestore=$(RuntimeNETCoreAppPackageName);
|
Prepare for 3.0.1xx servicing
We were bumping targeting pack, framework-dependent default
runtime version, and self-contained default (latest) runtime
version in unison. This only works for previews where these
versions are all the same always. Now that we're servicing 3.0,
we:
1. Pin targeting packs to 3.0.0
2. Fix default framework-dependent runtime version at 3.0.0
This change also:
* Removes dependencies on legacy/internal netcoreapp packages. We
now use Microsoft.NETCore.App.Internal version exclusively to
calculate the blob storage path for core-setup.
* Uses PackageDownload for all templates, including
latest. PackageReference had been used for latest only because
it hid another bug with the netcoreapp reference of
redist.csproj that is fixed here. That reference is now a
FrameworkReference as it should be.
* Removes a bunch of shenanigans from
GenerateBundledVersions.props that were causing issues with
above. One casualty of that is that we hard code the RID lists
for runtime pack, which I don't think is too bad, and actually
will make it easier to merge in source build patches.
* Cleans up how runtime and targeting pack versions are
referenced throughout, removing incorrect assumptions about
them being the same.
* Incorporates a prior closed PR to use suffixed version for blob
storage, even when assets coming from blob storage are
stabilized. It needed changes to merge with this.
Note:
* A similar theoretical servicing issue exists for the versions
of apphost, hostfxr, shared host, which are still assumed to be
the same as the runtime version in several places. If we choose
to service those independently, more work is required.
* There will be a 3.0.1 ASP.NET targeting pack, and so we will
have to unpin that once it is ready. This change establishes
the baseline of all targeting packs being pinnned, and they can
be unpinned in the (hopefully rare) cases where they need to be
serviced.
2019-10-03 17:33:20 +00:00
|
|
|
PackageVersionToRestore=$(MicrosoftNETCoreAppRuntimePackageVersion);
|
2018-12-04 02:15:31 +00:00
|
|
|
TargetFramework=$(TargetFramework)
|
|
|
|
</Properties>
|
2018-12-04 02:58:43 +00:00
|
|
|
</CrossGenDownloadPackageProject>
|
2018-12-04 02:15:31 +00:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<MSBuild
|
|
|
|
BuildInParallel="False"
|
2018-12-04 02:58:43 +00:00
|
|
|
Projects="@(CrossGenDownloadPackageProject)">
|
2018-12-04 02:15:31 +00:00
|
|
|
</MSBuild>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<RoslynFiles Include="$(SdkOutputDirectory)Roslyn\bincore\**\*" />
|
2020-08-20 03:40:36 +00:00
|
|
|
|
|
|
|
<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)" />
|
2018-12-04 02:15:31 +00:00
|
|
|
|
|
|
|
<!-- 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 -->
|
2019-07-30 01:13:54 +00:00
|
|
|
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk\tools\netcoreapp*\**\*" />
|
2018-12-04 02:15:31 +00:00
|
|
|
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\NuGet.Build.Tasks.Pack\CoreCLR\**\*" />
|
2020-04-09 18:48:42 +00:00
|
|
|
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tasks\netcoreapp*\*" />
|
|
|
|
<RemainingFiles Include="$(SdkOutputDirectory)Sdks\Microsoft.NET.Sdk.Razor\tools\netcoreapp*\**\*" />
|
2020-03-17 20:48:39 +00:00
|
|
|
<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*\**\*" />
|
2018-12-04 02:15:31 +00:00
|
|
|
|
|
|
|
<!-- 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" />
|
|
|
|
|
2019-02-20 08:07:45 +00:00
|
|
|
<!-- Don't crossgen reference assemblies redisted with msbuild for RoslynCodeTaskFactory -->
|
2020-09-08 17:10:14 +00:00
|
|
|
<RemainingFiles Remove="$(SdkOutputDirectory)**\ref\*.dll" />
|
2019-02-20 08:07:45 +00:00
|
|
|
|
2018-12-21 04:43:20 +00:00
|
|
|
<DiasymReaderPath Include="$(SharedFrameworkNameVersionPath)/Microsoft.DiaSymReader.Native.$(DIASymReaderCrossgenFilter).dll" />
|
2018-12-04 02:15:31 +00:00
|
|
|
</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->DirectoryName()->Distinct())" />
|
|
|
|
<FSharpFolders Include="@(FSharpTargets->DirectoryName()->Distinct())" />
|
|
|
|
<RemainingFolders Include="@(RemainingTargets->DirectoryName()->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\**\*" />
|
2020-03-20 21:42:20 +00:00
|
|
|
|
|
|
|
<!-- 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('/'))" />
|
|
|
|
|
2018-12-04 02:15:31 +00:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<!-- Crossgen does not support generating symbols on Mac -->
|
|
|
|
<PropertyGroup Condition="'$(CreateCrossgenSymbols)' == ''">
|
|
|
|
<CreateCrossgenSymbols>true</CreateCrossgenSymbols>
|
|
|
|
<CreateCrossgenSymbols Condition="'$(OSName)' == 'osx'">false</CreateCrossgenSymbols>
|
2018-12-26 03:08:40 +00:00
|
|
|
<CreateCrossgenSymbols Condition="'$(OSName)' == 'freebsd'">false</CreateCrossgenSymbols>
|
2018-12-04 02:15:31 +00:00
|
|
|
</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)"
|
2019-12-20 21:13:26 +00:00
|
|
|
DestinationFiles="@(PdbsToMove->'$(ArtifactsSymStoreDirectory)/sdk/$(Version)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
2018-12-04 02:15:31 +00:00
|
|
|
</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>
|