My application is based on plugins that are dynamically loaded and instantiated. This works for all Aspose nugets except for the AsposeImaging and specifically with conversion to DICOM.
If I build a simple CLI application it works but if I load dynamically I get:
C:/Repos/Filestar/experimental/AsposeImaging/Program/bin/Debug/net6.0/Program.exe
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Aspose.Imaging, Version=22.5.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56'. The system cannot find the file
specified.
File name: 'Aspose.Imaging, Version=22.5.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56'
at AsposeImaging.Converter.Convert(String inputPath, String outputPath)
at CallSite.Target(Closure , CallSite , Object , String , String )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Program.Converter.Main(String[] args) in C:\Repos\Filestar\experimental\AsposeImaging\Program\Converter.cs:line 41
I have created the simplest possible solution to show you: