dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.41k stars 4.76k forks source link

`wasm` not support the FrameworkReference of `Microsoft.AspNetCore.App` #110036

Open SongOfYouth opened 1 day ago

SongOfYouth commented 1 day ago

Description

When build a net9.0-browserwasm project, it raise a error: dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(495,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.

Reproduction Steps

create a net9.0-browserwasm project and add a FrameworkReference in .csproj:

  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>

Expected behavior

build successfully.

Actual behavior

raise a error: dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(495,5): error NETSDK1082: There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response