Skip to content

emcc-props.json leads to wrong path for JsonToItemsTaskFactory.dll #59619

@GeorgeS2019

Description

@GeorgeS2019

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

Regression?

Other information

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions