When building my Maui project with platform specific code i get the errors:
Microsoft.Android.Sdk.RuntimeConfig.targets(61, 5): [MSB4062] The "RuntimeConfigParserTask" task could not be loaded from the assembly <path>. Could not load file or assembly 'System.Text.Json, Version=7.0.0.3, Culture=neutral, PublicKeyToken=<value>' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
And
RuntimeComponentManifest.targets(14, 5): [MSB4175] The task factory "JsonToItemsTaskFactory.JsonToItemsTaskFactory" could not be loaded from the assembly <path>. Could not load file or assembly 'System.Text.Json, Version=7.0.0.3, Culture=neutral, PublicKeyToken=<value>' or one of its dependencies. The system cannot find the file specified.
I use .net 8 and my build targets of the project are net8.0-android;net8.0-ios
. It looks like my project wants to access a Microsoft package (System.Text.Json) thats for .net 7. However i never specified this package and when i did with the .net 8 variant the system still threw these errors. I tried looking this up but i couldnt find anything related. Does anyone know how i can resolve these errors?