From ede7d08984b8f553f1eea58caad1e90b1e9ce51f Mon Sep 17 00:00:00 2001 From: Adrian Wright <47532258+adrianwright109@users.noreply.github.com> Date: Thu, 13 Aug 2020 17:41:03 +0100 Subject: [PATCH] Allow ".dll" extensions in BlazorWebAssemblyLazyLoad MSBuild task. (#24866) * Allow ".dll" extensions in BlazorWebAssemblyLazyLoad MSBuild task. * Only allow assemblies that are specified with an extension. Co-authored-by: Adrian Wright --- .../Sdk/integrationtests/WasmBuildLazyLoadTest.cs | 8 ++++---- .../Sdk/src/GenerateBlazorWebAssemblyBootJson.cs | 2 +- .../test/testassets/BasicTestApp/BasicTestApp.csproj | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Components/WebAssembly/Sdk/integrationtests/WasmBuildLazyLoadTest.cs b/src/Components/WebAssembly/Sdk/integrationtests/WasmBuildLazyLoadTest.cs index 424caeda2d..e3925465bb 100644 --- a/src/Components/WebAssembly/Sdk/integrationtests/WasmBuildLazyLoadTest.cs +++ b/src/Components/WebAssembly/Sdk/integrationtests/WasmBuildLazyLoadTest.cs @@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests project.AddProjectFileContent( @" - + "); @@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests project.AddProjectFileContent( @" - + "); @@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests project.AddProjectFileContent( @" - + "); @@ -135,7 +135,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests project.AddProjectFileContent( @" - + "); diff --git a/src/Components/WebAssembly/Sdk/src/GenerateBlazorWebAssemblyBootJson.cs b/src/Components/WebAssembly/Sdk/src/GenerateBlazorWebAssemblyBootJson.cs index 81cb6ecb96..ae784010fd 100644 --- a/src/Components/WebAssembly/Sdk/src/GenerateBlazorWebAssemblyBootJson.cs +++ b/src/Components/WebAssembly/Sdk/src/GenerateBlazorWebAssemblyBootJson.cs @@ -88,7 +88,7 @@ namespace Microsoft.NET.Sdk.BlazorWebAssembly var assetType = resource.GetMetadata("AssetType"); var resourceName = $"{fileName}{extension}"; - if (IsLazyLoadedAssembly(fileName)) + if (IsLazyLoadedAssembly(resourceName)) { resourceData.lazyAssembly ??= new ResourceHashesByNameDictionary(); resourceList = resourceData.lazyAssembly; diff --git a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj index 122d4bacff..13f08442bf 100644 --- a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj +++ b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj @@ -30,8 +30,8 @@ - - + +