Uh oh!
There was an error while loading. Please reload this page.
[wasm] Fix analyzer support in templates - #77704
Conversation
ghost
commented
Nov 1, 2022
Tagging subscribers to 'arch-wasm': @lewing Issue Details
|
radical
commented
Nov 1, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
radical
commented
Nov 1, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
621ca03 to
31599a4Compare- Add
`[assembly:System.Runtime.Versioning.SupportedOSPlatform("browser")]`
to the browser, and console templates. This would allow the analyzers,
if enabled, to treat the assembly as one that will run only on
browser.
- Also, populate `@(SupportedPlatform)` with only `browser`, for *wasm*
projects, similar to https://github.com/dotnet/sdk/blob/fef8cedfb6b4ac85a7e135f3e4f155e29cdcbdf1/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets#L75-L7931599a4 to
142b063Compareradical
commented
Nov 1, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
radical
commented
Nov 1, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ba5c91b to
1e189ecCompare| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| [assembly:System.Runtime.Versioning.SupportedOSPlatform("browser")] |
There was a problem hiding this comment.
Is this the best approach we can offer?
There was a problem hiding this comment.
IIUC, this is needed. I'm not sure how else we can do this, but open to suggestions!
pavelsavara
commented
Nov 1, 2022
If this is the right way how to do it, then the samples\wasm should get the same treatment and then we could |
radical
commented
Nov 1, 2022
@akoeplinger does my implementation look correct? I added it for the samples, but didn't enable the analyzers. We could try that. |
pavelsavara
commented
Nov 1, 2022
radical
commented
Nov 1, 2022
This is good to go, once we have an approval. |
radical
commented
Nov 1, 2022
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Add
[assembly:System.Runtime.Versioning.SupportedOSPlatform("browser")]to the browser, and console templates. This would allow the analyzers,
if enabled, to treat the assembly as one that will run only on
browser.
Populate
@(SupportedPlatform)with onlybrowser, for wasmprojects, similar to https://github.com/dotnet/sdk/blob/fef8cedfb6b4ac85a7e135f3e4f155e29cdcbdf1/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets#L75-L79
This also fixes the firefox CI build which regressed recently