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" />
|
<type fullname="System.ComponentModel.TimeSpanConverter" />
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
||||||
<assembly fullname="System.Runtime.InteropServices.JavaScript" preserve="all" />
|
|
||||||
|
|
||||||
<assembly fullname="System.Text.Json">
|
<assembly fullname="System.Text.Json">
|
||||||
<!-- S.T.J. uses Activator.CreateInstance to instantiate converters, so we need to preserve default constructors.
|
<!-- 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
|
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>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<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.PublishedContent)</ContentSourcePath>
|
||||||
<ContentSourcePath Condition="'%(ServiceWorker.PublishedContent)' == ''">%(ServiceWorker.Identity)</ContentSourcePath>
|
<ContentSourcePath Condition="'%(ServiceWorker.PublishedContent)' == ''">%(ServiceWorker.Identity)</ContentSourcePath>
|
||||||
<RelativePath>%(ServiceWorker.Identity)</RelativePath>
|
<RelativePath>%(ServiceWorker.Identity)</RelativePath>
|
||||||
|
|
@ -154,7 +154,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
CopyToPublishDirectory="PreserveNewest"
|
CopyToPublishDirectory="PreserveNewest"
|
||||||
RelativePath="%(_ServiceWorkerIntermediatePublishFile.RelativePath)"
|
RelativePath="%(_ServiceWorkerIntermediatePublishFile.RelativePath)"
|
||||||
ExcludeFromSingleFile="true" />
|
ExcludeFromSingleFile="true" />
|
||||||
|
|
||||||
<ResolvedFileToPublish
|
<ResolvedFileToPublish
|
||||||
Include="$(_ServiceWorkerAssetsManifestPublishIntermediateOutputPath)"
|
Include="$(_ServiceWorkerAssetsManifestPublishIntermediateOutputPath)"
|
||||||
CopyToPublishDirectory="PreserveNewest"
|
CopyToPublishDirectory="PreserveNewest"
|
||||||
|
|
|
||||||
|
|
@ -307,36 +307,26 @@ Copyright (c) .NET Foundation. All rights reserved.
|
||||||
|
|
||||||
<Target Name="_CreateBlazorTrimmerRootDescriptorFiles" BeforeTargets="ILLink" AfterTargets="ComputeResolvedFilesToPublishList">
|
<Target Name="_CreateBlazorTrimmerRootDescriptorFiles" BeforeTargets="ILLink" AfterTargets="ComputeResolvedFilesToPublishList">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_BlazorApplicationTrimmerDescriptorFile>$(IntermediateOutputPath)default.trimmerdescriptor.xml</_BlazorApplicationTrimmerDescriptorFile>
|
|
||||||
<_BlazorTypeGranularTrimmerDescriptorFile>$(IntermediateOutputPath)typegranularity.trimmerdescriptor.xml</_BlazorTypeGranularTrimmerDescriptorFile>
|
<_BlazorTypeGranularTrimmerDescriptorFile>$(IntermediateOutputPath)typegranularity.trimmerdescriptor.xml</_BlazorTypeGranularTrimmerDescriptorFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_BlazorTypeGranularAssembly
|
<_BlazorTypeGranularAssembly
|
||||||
Include="@(ResolvedFileToPublish)"
|
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>
|
<Required>false</Required>
|
||||||
<Preserve>all</Preserve>
|
<Preserve>all</Preserve>
|
||||||
</_BlazorTypeGranularAssembly>
|
</_BlazorTypeGranularAssembly>
|
||||||
|
|
||||||
<_BlazorApplicationAssembly Include="@(IntermediateAssembly)">
|
|
||||||
<Required>true</Required>
|
|
||||||
</_BlazorApplicationAssembly>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<CreateBlazorTrimmerRootDescriptorFile
|
|
||||||
Assemblies="@(_BlazorApplicationAssembly)"
|
|
||||||
TrimmerFile="$(_BlazorApplicationTrimmerDescriptorFile)" />
|
|
||||||
|
|
||||||
<CreateBlazorTrimmerRootDescriptorFile
|
<CreateBlazorTrimmerRootDescriptorFile
|
||||||
Assemblies="@(_BlazorTypeGranularAssembly)"
|
Assemblies="@(_BlazorTypeGranularAssembly)"
|
||||||
TrimmerFile="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
TrimmerFile="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<TrimmerRootDescriptor Include="$(_BlazorApplicationTrimmerDescriptorFile)" />
|
<TrimmerRootDescriptor Include="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
||||||
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)LinkerWorkaround.xml" />
|
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)LinkerWorkaround.xml" />
|
||||||
|
|
||||||
<FileWrites Include="$(_BlazorApplicationTrimmerDescriptorFile)" />
|
|
||||||
<FileWrites Include="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
<FileWrites Include="$(_BlazorTypeGranularTrimmerDescriptorFile)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue