SDK fixes (#23317)
* Fix up Blazor ILLink Descriptor files 1. Add the typegranularity file to TrimmerRootDescriptor. 2. Remove the application assembly descriptor file, since the application assembly is passed in as a RootAssembly already. * Razor SDK fixups for blazor * Only include dlls when generating type granular assemblies * Write server-worker to the obj directory Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
This commit is contained in:
parent
4465a8efc8
commit
a93ff60904
|
|
@ -13,8 +13,6 @@
|
|||
<type fullname="System.ComponentModel.TimeSpanConverter" />
|
||||
</assembly>
|
||||
|
||||
<assembly fullname="System.Runtime.InteropServices.JavaScript" preserve="all" />
|
||||
|
||||
<assembly fullname="System.Text.Json">
|
||||
<!-- S.T.J. uses Activator.CreateInstance to instantiate converters, so we need to preserve default constructors.
|
||||
For safety, do this for all converter types, even though most of them are preserved anyway due to being referenced
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ServiceWorkerIntermediatePublishFile Include="%(ServiceWorker.IntermediateOutputPath)serviceworkers\%(FileName).publish%(Extension)">
|
||||
<_ServiceWorkerIntermediatePublishFile Include="$(IntermediateOutputPath)serviceworkers\%(FileName).publish%(Extension)">
|
||||
<ContentSourcePath Condition="'%(ServiceWorker.PublishedContent)' != ''">%(ServiceWorker.PublishedContent)</ContentSourcePath>
|
||||
<ContentSourcePath Condition="'%(ServiceWorker.PublishedContent)' == ''">%(ServiceWorker.Identity)</ContentSourcePath>
|
||||
<RelativePath>%(ServiceWorker.Identity)</RelativePath>
|
||||
|
|
@ -154,7 +154,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
CopyToPublishDirectory="PreserveNewest"
|
||||
RelativePath="%(_ServiceWorkerIntermediatePublishFile.RelativePath)"
|
||||
ExcludeFromSingleFile="true" />
|
||||
|
||||
|
||||
<ResolvedFileToPublish
|
||||
Include="$(_ServiceWorkerAssetsManifestPublishIntermediateOutputPath)"
|
||||
CopyToPublishDirectory="PreserveNewest"
|
||||
|
|
|
|||
|
|
@ -307,36 +307,26 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
|
||||
<Target Name="_CreateBlazorTrimmerRootDescriptorFiles" BeforeTargets="ILLink" AfterTargets="ComputeResolvedFilesToPublishList">
|
||||
<PropertyGroup>
|
||||
<_BlazorApplicationTrimmerDescriptorFile>$(IntermediateOutputPath)default.trimmerdescriptor.xml</_BlazorApplicationTrimmerDescriptorFile>
|
||||
<_BlazorTypeGranularTrimmerDescriptorFile>$(IntermediateOutputPath)typegranularity.trimmerdescriptor.xml</_BlazorTypeGranularTrimmerDescriptorFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_BlazorTypeGranularAssembly
|
||||
Include="@(ResolvedFileToPublish)"
|
||||
Condition="$([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.')) or $([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.'))">
|
||||
Condition="'%(Extension)' == '.dll' AND ($([System.String]::Copy('%(Filename)').StartsWith('Microsoft.AspNetCore.')) or $([System.String]::Copy('%(Filename)').StartsWith('Microsoft.Extensions.')))">
|
||||
<Required>false</Required>
|
||||
<Preserve>all</Preserve>
|
||||
</_BlazorTypeGranularAssembly>
|
||||
|
||||
<_BlazorApplicationAssembly Include="@(IntermediateAssembly)">
|
||||
<Required>true</Required>
|
||||
</_BlazorApplicationAssembly>
|
||||
</ItemGroup>
|
||||
|
||||
<CreateBlazorTrimmerRootDescriptorFile
|
||||
Assemblies="@(_BlazorApplicationAssembly)"
|
||||
TrimmerFile="$(_BlazorApplicationTrimmerDescriptorFile)" />
|
||||
|
||||
<CreateBlazorTrimmerRootDescriptorFile
|
||||
Assemblies="@(_BlazorTypeGranularAssembly)"
|
||||
TrimmerFile="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
||||
|
||||
<ItemGroup>
|
||||
<TrimmerRootDescriptor Include="$(_BlazorApplicationTrimmerDescriptorFile)" />
|
||||
<TrimmerRootDescriptor Include="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
||||
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)LinkerWorkaround.xml" />
|
||||
|
||||
<FileWrites Include="$(_BlazorApplicationTrimmerDescriptorFile)" />
|
||||
<FileWrites Include="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
|
|
|||
Loading…
Reference in New Issue