AspNetCore.Client icon indicating copy to clipboard operation
AspNetCore.Client copied to clipboard

Client generation for Blazor client side

Open SindelarPetr opened this issue 5 years ago • 0 comments

Hello, thanks for this great repo! I have a wasm Blazor app (that is net standard 2) with asp.net core 3.1 (preview) backend. I recently tried to generate the NET client, which was successful (very easy to include in the project, I am amazed!). But the problem is that the AspNetCore.Client dependency causes the Blazor-client to fail to compile. The following error can be found in the output:

Fatal error in IL Linker
3>
3>Unhandled Exception: Mono.Linker.MarkException: Error processing method: 'System.IDisposable Microsoft.Extensions.Logging.Logger::BeginScope(TState)' in assembly: 'Microsoft.Extensions.Logging.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Microsoft.Extensions.Logging.Abstractions.Internal.NullScope Microsoft.Extensions.Logging.Abstractions.Internal.NullScope::get_Instance()
3>   at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
3>   at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
3>   at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
3>   at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
3>   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
3>   at Mono.Linker.Steps.MarkStep.ProcessQueue()
3>   --- End of inner exception stack trace ---
3>   at Mono.Linker.Steps.MarkStep.ProcessQueue()
3>   at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
3>   at Mono.Linker.Steps.MarkStep.Process()
3>   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
3>   at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
3>   at Mono.Linker.Pipeline.Process(LinkContext context)
3>   at Mono.Linker.Driver.Run(ILogger customLogger)
3>   at Mono.Linker.Driver.Execute(String[] args, ILogger customLogger)
3>   at Mono.Linker.Driver.Main(String[] args)

When the dependency to AspNetCore.Client is removed from the client, then the project compiles again.

As long as .net core 3.1 is not listed as a supported framework it is not surprising that its not working. The question then is, is it going to be supported in the near future? I guess this could be one of the biggest features for client-side blazor apps.

Thank you and have a great day,

Petr Šindelář

SindelarPetr avatar Nov 15 '19 18:11 SindelarPetr