C# application hangs with managed DirectX and WPF .NET 4.0

If you’re using DirectX with WPF and .NET 4, you might see your application hang without any explanation.
This is because they changed the way mixed mode assemblies are loaded in .NET, so you have to revert to the old loader policy, or get an updated DirectX version that isn’t built against a lower version of the runtime.

You may be able to resolve this hang by enabling LegacyV2RuntimeActivationPolicy in your app.config.

Tom

Leave a comment

Your email address will not be published. Required fields are marked *