Newbie: MagickConfigureWarnigException UnableToOpenConfigureFile `type.xml'

May 27, 2013 at 10:10 AM
Hi!

I'm new to c# and .NET (not to ImageMagick!) and MagickNET seems great!
However, I get this MagickConfigureWarnigException when running the example below:
Magick2.vshost.exe: UnableToOpenConfigureFile `type.xml' @ warning/configure.c/GetConfigureOptions/616
What to do about that?

Regards / Jonas
            MagickNET.Initialize();

            var image = new MagickImage(@"I:\test.png");
            image.Annotate("Hello baby", Gravity.Center); // <-- This causes the exception
            image.Write(@"I:\testAnnotation.png");
Coordinator
May 27, 2013 at 10:23 AM
What version of Magick.NET are you using? How did you install it, are you using a NuGet package or one of the zip files? It seems that the file 'type.xml' is missing from the directory that contains the ImageMagick libraries (e.g. CORE_RL_Magick++_.dll).
May 27, 2013 at 10:31 AM
Thank you, dlemstra! I'm using the NuGet Magick.NET-Q16-x86 version 6.8.5.401.
Right, there is was type.xml in the dll directory. Acutally, no xml at all!

I added the from the downloadable zip, and now it works without warnings!

Thanks a lot!
Coordinator
May 27, 2013 at 4:14 PM
Edited May 27, 2013 at 4:14 PM
The xml files should be copied automatically to the ImageMagick folder in your bin directory. I just tested it on my machine with Visual Studio 2012 and the xml files are being copied. I will change the implementation of MagickNET.Initialize() to check if all the files that are necessary can be found. If one of the files cannot be found an exception will be raised by MagickNET.Initialize().