Skip to content

Commit 4f64c65

Browse files
authored
Add a regression test for web.config transform (#25056)
This was resolved as part of moving to the WebAssembly SDK. A test that would have helped us catch this sooner. This change addresses the test gap. Resolves #24568
1 parent 3c34c3a commit 4f64c65

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Components/WebAssembly/Sdk/integrationtests/Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
<Compile Include="..\src\BootJsonData.cs" LinkBase="Wasm" />
3737
<Compile Include="..\src\AssetsManifestFile.cs" LinkBase="Wasm" />
3838
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
39+
40+
<EmbeddedResource Include="..\src\targets\BlazorWasm.web.config" />
3941
</ItemGroup>
4042

4143
<Target Name="GenerateTestData" BeforeTargets="GetAssemblyAttributes">

src/Components/WebAssembly/Sdk/integrationtests/WasmPublishIntegrationTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public async Task Publish_MinimalApp_Works()
4141

4242
// Verify web.config
4343
Assert.FileExists(result, publishDirectory, "web.config");
44+
var webConfigContent = new StreamReader(GetType().Assembly.GetManifestResourceStream("Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.BlazorWasm.web.config")).ReadToEnd();
45+
Assert.FileContentEquals(result, Path.Combine(publishDirectory, "web.config"), webConfigContent);
4446
Assert.FileCountEquals(result, 1, publishDirectory, "*", SearchOption.TopDirectoryOnly);
4547

4648
VerifyBootManifestHashes(result, blazorPublishDirectory);

0 commit comments

Comments
 (0)