I am trying to make a shared class library in .NET 5 with a .proto file in it and 3 dependencies:
- Google.protobuf
- Grpc.Aspnetcore
- Grpc.Tools
When I add a project reference from the server project there is no problem whatsoever. I know this for sure because I first built the project without the shared folder and everything was working as it should. When I made the shared project and only changed the server project, it still worked perfectly.
However, as soon as I added a reference from the Client project to the shared project an error message appeared on the build(I have also tried adding a service reference, with the same error occurring):
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'
This issue was mentioned in this question: "There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'"
However one of the solutions is removing the dependency but that's not possible in my case.
The other solution says I should make some changes in the .csproj file of the client. But when I do this, the solution does build, but it will not load because it all of the sudden can't find the Blazor.WebAssembly.js file.
Has anyone had the same problem or knows what it could be? Don't hesitate to ask any question for extra information!