* [wasm] Catch warnings in wasm template project builds
This will help catch warnings like the ones fixed in https://github.com/dotnet/runtime/pull/77704
* [wasm][debugger] tests: fix warning
`[18:17:44] warn: Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware[16] The WebRootPath was not found: /datadisks/disk1/work/
B4180A14/w/
992108AB/e/DebuggerTestSuite/wwwroot. Static files may be unavailable.`
.EnsureSuccessful();
string projectfile = Path.Combine(_projectDir!, $"{id}.csproj");
+ string extraProperties = string.Empty;
+ extraProperties += "<TreatWarningsAsErrors>true</TreatWarningsAsErrors>";
if (runAnalyzers)
- AddItemsPropertiesToProject(projectfile, "<RunAnalyzers>true</RunAnalyzers>");
+ extraProperties += "<RunAnalyzers>true</RunAnalyzers>";
if (UseWebcil)
- AddItemsPropertiesToProject(projectfile, "<WasmEnableWebcil>true</WasmEnableWebcil>");
+ extraProperties += "<WasmEnableWebcil>true</WasmEnableWebcil>";
+ AddItemsPropertiesToProject(projectfile, extraProperties);
+
return projectfile;
}
this._loggerFactory = loggerFactory;
app.UseWebSockets();
- app.UseStaticFiles();
TestHarnessOptions options = optionsAccessor.CurrentValue;