Hi @Falanga, Rod, DOH ,
The error you’re seeing stems not from the fact that you’re using a Minimal API, but from a mismatch between server-side shared frameworks and a client-side (WebAssembly) runtime.
The Microsoft.AspNetCore.App package is a shared framework bundle that contains assemblies for ASP.NET Core and is installed with the runtime. Projects that target the Microsoft.NET.Sdk.Web SDK implicitly reference it, so you don’t need to (and should not) add it manually. You can read more on it here Microsoft.AspNetCore.App metapackage for ASP.NET Core | Microsoft Learn
When you build a WebAssembly app (i.e. targeting browser-wasm), the runtime environment is the browser’s WebAssembly-CLR, which obviously cannot load the server’s shared framework runtime pack. That’s why you got "There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'"
In short: you have a client-side build trying to pull in a server-side shared framework.
Make sure your Minimal API project (server) uses the Microsoft.NET.Sdk.Web SDK, targets a server runtime (e.g., net8.0/net9.0), and does not explicitly reference Microsoft.AspNetCore.App. On the client (Blazor WebAssembly) side, make sure that you do not reference the API project directly in a way that brings in that shared framework - consume the API via HTTP instead.
Hope this helps.