Remove the file extension in CreateBlazorTrimmerRootDescriptorFile (#23330)

The linker doesn't resolve assemblies correctly if the file extension (.dll) is included in the assembly name in the descriptor xml file.

See also https://github.com/mono/linker/issues/1294
This commit is contained in:
Eric Erhardt 2020-06-26 10:34:03 -05:00 committed by GitHub
parent 1f56e82732
commit 4891eadbbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,9 @@ namespace Microsoft.AspNetCore.Razor.Tasks
var roots = new XElement("linker");
foreach (var assembly in Assemblies)
{
var assemblyName = assembly.GetMetadata("FileName") + assembly.GetMetadata("Extension");
// NOTE: Descriptor files don't include the file extension
// in the assemblyName.
var assemblyName = assembly.GetMetadata("FileName");
var typePreserved = assembly.GetMetadata("Preserve");
var typeRequired = assembly.GetMetadata("Required");