Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Mono's msbuild can't build Blazor WASM projects #19466

@rodrmoya

Description

@rodrmoya

Steps to Reproduce

$ dotnet new -i Microsoft.AspNetCore.Components.WebAssembly.Templates::3.2.0-preview3.20168.3
$ dotnet new blazorwasm -o Wasm
$ cd Wasm
$ msbuild Wasm.csproj

Current Behavior

Build fails with:

_ResolveBlazorInputs:
  Creating directory "obj/Debug/netstandard2.1/blazor/".
/Users/rodrigo/.nuget/packages/microsoft.aspnetcore.components.webassembly.build/3.2.0-preview3.20168.3/targets/Blazor.MonoRuntime.targets(348,5): error : Specified cast is not valid. [/private/tmp/BlazorWasm/BlazorWasm.csproj]
Done Building Project "/private/tmp/BlazorWasm/BlazorWasm.csproj" (default targets) -- FAILED.

Expected Behavior

Build succeeds

On which platforms did you notice this

[x] macOS
[ ] Linux
[ ] Windows

Version Used:

6.10.0.101

Stacktrace

See dotnet/aspnetcore#20259 for more information and the MSBuild stack trace. From the last comment from @pranavkm seems the issue is with the DataContractJsonSerializer implementation in Mono

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions