One of the references in an automation script is causing a ReflectionTypeLoadException
The reference is Skyline.DataMiner.Core.ArtifactInstaller 2.1.3.0 which is requesting System.Text.Json 9.0.0.6.
This is a version that is not available on NuGet.
I want to know what I can do to find what is using the Skyline.DataMiner.Core.ArtifactInstaller, and how I can resolve this?
The DM Version is 10.4.0.0 - 15580-CU13
The problem was found by our software team. This ArtifactInstaller is used in dmapp packages.
This loads the reference to System.Text.Json in slautomation memory.
The problem typically doesn't happen, but because this script uses reflection it throws the mentioned exception.
quick workaround: restart slautomation
better fix: Add a try-catch around the reflection logic to skip assemblies that throw ReflectionTypeLoadException.
best fix: Avoid scanning all assemblies via reflection for JSON-related tasks — this approach is fragile and inefficient by design.