Skip to content

Commit d3159fe

Browse files
committed
Fix templatizer to account for old blazor desktop compat
1 parent bad4dad commit d3159fe

File tree

2 files changed

+586
-588
lines changed

2 files changed

+586
-588
lines changed

src/Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/BlazorWasmBaselineTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33
//
44

5-
using System;
6-
using System.IO;
75
using Microsoft.AspNetCore.Razor.Tasks;
86
using Microsoft.NET.Sdk.Razor.Tests;
97
using Microsoft.NET.TestFramework;
@@ -20,7 +18,7 @@ public BlazorWasmBaselineTests(ITestOutputHelper log, bool generateBaselines) :
2018

2119
private string TemplatizeCompressedAssets(StaticWebAsset asset, string originalValue, StaticWebAsset relatedAsset)
2220
{
23-
if (!asset.IsAlternativeAsset())
21+
if (!asset.IsAlternativeAsset() && Path.GetExtension(asset.Identity) != ".gz")
2422
{
2523
return null;
2624
}
@@ -30,7 +28,7 @@ private string TemplatizeCompressedAssets(StaticWebAsset asset, string originalV
3028
return null;
3129
}
3230

33-
if (originalValue.Contains("[["))
31+
if (originalValue.Replace("[[CustomPackageVersion]]", "__CustomVersion__").Contains("[["))
3432
{
3533
return null;
3634
}

0 commit comments

Comments
 (0)