-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
emcc-props.json leads to wrong path for JsonToItemsTaskFactory.dll #59619
Comments
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsDescriptionError MSB4175: 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 => 408C:\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
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" }
]
}
} Configuration6.0.0-rtm.21474.5 Regression?Other information
|
We are also getting this on Windows now after bumping the SDK: dotnet/maui#2659 However, we are using the full msbuild to build the solution - which is what the IDE uses. This does not seem to be a problem on macOS. |
cc @lewing. Not sure what the appropriate area label might be for this one. |
/cc @steveisok I |
I figured out the issue. It is because the public preview of VS/MSBuild has older dlls. It works locally for me because I am also running the main build of VS. However, since we use the public previews of VS on CI, I created this script to update the dlls in place in a VS install. I believe this goes away once P5 of VS is released: https://github.com/dotnet/maui/blob/2c1b919cf5132262a2328adba59a67141d0f12d0/eng/scripts/patch-vs.ps1 |
tl;dr - @mattleibow is right this is gonna be fixed by VS2022 Preview 5. Details:
I discussed with @steveisok and we think it's too risky to change how the runtime is packaging JsonToItemsTaskFactory.dll and RuntimeConfigParser.dll tasks for .NET 6 RTM. For .NET 7+ we need to:
|
…Sdk pack Instead of 3 assemblies for some tiny tasks. Building a single assembly also ensures that everything in the pack depends on and bundles identical versions of dependent assemblies. For example on net472, a single version of System.Text.Json with a single fixed version shared by both the JsonToItemsTaskFactory task factory and the RuntimeConfigParser task. Related to dotnet#59619
…gets.Sdk pack (#59720) * Build one MonoTargetsTasks assembly for Mono.NET.Runtime.MonoTargets.Sdk pack Instead of 3 assemblies for some tiny tasks. Building a single assembly also ensures that everything in the pack depends on and bundles identical versions of dependent assemblies. For example on net472, a single version of System.Text.Json with a single fixed version shared by both the JsonToItemsTaskFactory task factory and the RuntimeConfigParser task. Related to #59619 * Update testing and wasm to use MonoTargetsTasks.dll * Move assembly stripper to a separate assembly Build it with nullability checking disabled. Build the main MonoTargetsTasks assembly with nullability enabled * Don't include msbuild assemblies in MonoTargets package * re-enable analyzers for the MonoTargetsTasks assembly * Include *.dll in the MonoTargetsTasks nupkg In particular, pick up all the dependent assemblies for the net472 build * Update various READMEs * remove unneeded target * Switch ILStrip to use the same Parallel.ForEach logic as MonoAOTCompiler * Remove unneeded NoWarn warnings * rearrange package references in MonoTargetsTask.csproj for readabilty * More ItemGroup reformatting * fix nits * Use SystemThreadingTasksExtensionsVersion instead of hardcoding Co-authored-by: Ankit Jain <radical@gmail.com>
@mattleibow and other Webssembly experts here. I need links and milestones which I can follow to eventually port e.g. TorchShrp c++ dlls to WebAssembly in the same way as SkiaSharp native assets |
The runtime pack packaging of the tasks was improved in #59720 |
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
The content of emcc-props.json
Configuration
6.0.0-rtm.21474.5
VS Enterprise 2022 preview (64bit) version 17.0.0 Preview 4.1
Regression?
Other information
The text was updated successfully, but these errors were encountered: