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 <adrian@compiledcoding.co.uk>
This commit is contained in:
Adrian Wright 2020-08-13 17:41:03 +01:00 committed by GitHub
parent 9f0ae10cab
commit ede7d08984
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
project.AddProjectFileContent(
@"
<ItemGroup>
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
</ItemGroup>
");
@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
project.AddProjectFileContent(
@"
<ItemGroup>
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
</ItemGroup>
");
@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
project.AddProjectFileContent(
@"
<ItemGroup>
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
</ItemGroup>
");
@ -135,7 +135,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
project.AddProjectFileContent(
@"
<ItemGroup>
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
</ItemGroup>
");

View File

@ -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;

View File

@ -30,8 +30,8 @@
</ItemGroup>
<ItemGroup>
<BlazorWebAssemblyLazyLoad Include="Newtonsoft.Json" />
<BlazorWebAssemblyLazyLoad Include="LazyTestContentPackage" />
<BlazorWebAssemblyLazyLoad Include="Newtonsoft.Json.dll" />
<BlazorWebAssemblyLazyLoad Include="LazyTestContentPackage.dll" />
</ItemGroup>
</Project>