Can ImageMagick.Net be used in WPF?

Mar 20, 2012 at 2:55 PM

I can use ImageMagick.Net in Windows Form.

But I can not use ImageMagick.Net in WPF.

Is it true ? "We can not use ImageMagick.Net in WPF."

Mar 20, 2012 at 10:59 PM

I just tried it myself with a simple application that just flips an image and it worked. What is the error messages that you receive when you try to use it in WPF?

Mar 24, 2012 at 6:16 AM
dlemstra wrote:

I just tried it myself with a simple application that just flips an image and it worked. What is the error messages that you receive when you try to use it in WPF?

 

FileLoadException:

mixed mode assembly is for v.2.0.50727 runtime, can not load 4.0 runtime without configuration information.

Mar 27, 2012 at 7:45 AM

You need to add the following to your app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<startup useLegacyV2RuntimeActivationPolicy="true">
		<supportedRuntime version="v4.0" />
	</startup>
</configuration>

Mar 27, 2012 at 5:16 PM

Thanks a lot. It DO work.