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:
parent
9f0ae10cab
commit
ede7d08984
|
|
@ -21,7 +21,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
project.AddProjectFileContent(
|
project.AddProjectFileContent(
|
||||||
@"
|
@"
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
|
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
project.AddProjectFileContent(
|
project.AddProjectFileContent(
|
||||||
@"
|
@"
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
|
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
project.AddProjectFileContent(
|
project.AddProjectFileContent(
|
||||||
@"
|
@"
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
|
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
project.AddProjectFileContent(
|
project.AddProjectFileContent(
|
||||||
@"
|
@"
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary' />
|
<BlazorWebAssemblyLazyLoad Include='RazorClassLibrary.dll' />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
");
|
");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ namespace Microsoft.NET.Sdk.BlazorWebAssembly
|
||||||
var assetType = resource.GetMetadata("AssetType");
|
var assetType = resource.GetMetadata("AssetType");
|
||||||
var resourceName = $"{fileName}{extension}";
|
var resourceName = $"{fileName}{extension}";
|
||||||
|
|
||||||
if (IsLazyLoadedAssembly(fileName))
|
if (IsLazyLoadedAssembly(resourceName))
|
||||||
{
|
{
|
||||||
resourceData.lazyAssembly ??= new ResourceHashesByNameDictionary();
|
resourceData.lazyAssembly ??= new ResourceHashesByNameDictionary();
|
||||||
resourceList = resourceData.lazyAssembly;
|
resourceList = resourceData.lazyAssembly;
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BlazorWebAssemblyLazyLoad Include="Newtonsoft.Json" />
|
<BlazorWebAssemblyLazyLoad Include="Newtonsoft.Json.dll" />
|
||||||
<BlazorWebAssemblyLazyLoad Include="LazyTestContentPackage" />
|
<BlazorWebAssemblyLazyLoad Include="LazyTestContentPackage.dll" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue