-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
When building the project: blazor native
This error happens
Error MSB4175:
The task factory "JsonToItemsTaskFactory.JsonToItemsTaskFactory" could not be loaded from the assembly "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.MonoTargets.Sdk\6.0.0-rtm.21474.5\Sdk..\tasks\net472\JsonToItemsTaskFactory.dll". Could not load file or assembly 'System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
net472\JsonToItemsTaskFactory.dll is in the directory
"C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.MonoTargets.Sdk\6.0.0-rtm.21474.5\tasks\net472\JsonToItemsTaskFactory.dll"
instead of
"C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.MonoTargets.Sdk\6.0.0-rtm.21474.5\Sdk..\tasks\net472\JsonToItemsTaskFactory.dll"
The report problem is in the WasmApp.Native.targets line => 408
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\6.0.0-rtm.21474.5\Sdk\WasmApp.Native.targets line => 408
WasmApp.Native.targets line 408
<ReadEmccProps JsonFilePath="$(_WasmRuntimePackSrcDir)emcc-props.json">
<Output TaskParameter="EmccProperties" ItemName="_EmccPropItems" />
</ReadEmccProps>
The content of emcc-props.json
{
"items": {
"EmccProperties": [
{ "identity": "RuntimeEmccVersion", "value": "2.0.23" },
{ "identity": "RuntimeEmccVersionRaw", "value": "emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.23 (b15ca40ca02f469de3bf9a4de67a2655aede8974)" },
{ "identity": "RuntimeEmccVersionHash", "value": "b15ca40ca02f469de3bf9a4de67a2655aede8974" }
]
}
}Configuration
6.0.0-rtm.21474.5
VS Enterprise 2022 preview (64bit) version 17.0.0 Preview 4.1