Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SongOfYouth opened this issue Nov 21, 2024 · 3 comments
Open

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

SongOfYouth opened this issue Nov 21, 2024 · 3 comments
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm untriaged New issue has not been triaged by the area owner

Comments

@SongOfYouth
Copy link

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

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 21, 2024
@maraf
Copy link
Member

maraf commented Dec 5, 2024

The Microsoft.AspNetCore.App is not supported on WebAssembly. What is your motivation for adding the reference?

@maraf maraf added arch-wasm WebAssembly architecture needs-author-action An issue or pull request that requires more info or actions from the author. os-browser Browser variant of arch-wasm labels Dec 5, 2024
@SongOfYouth
Copy link
Author

The Microsoft.AspNetCore.App is not supported on WebAssembly. What is your motivation for adding the reference?

So how blazor works as server-side and provide WebApi at the same time?

@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Dec 5, 2024
@SongOfYouth
Copy link
Author

In my case, there are some abstractions of aspnetcore i need share with client, eg. [AllowAnonymous],[HttpPost]. with that i can generate the HttpClient code dynamicly at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants