Wpf – Cannot run 32bit compiled WPF applications on Windows 7 64bit

64-bitwpf

I created a WPF project in VS2008 and compiled it with Any CPU, x64 and x86. Any CPU and x64 works, but compiling to x86 the application is hanging when running through VS2008 and crashing when running without debugging. Debugging it with WinDbg I can see a StackOverflowException and sometimes a MissingMethodException relating to WPF methods.

Common sense is telling something here that the CLR is not loading the correct assemblies or something when running 32bit WPF apps. I tried reinstalling .NET Framework 3.5 SP1, but it does not fix the problem. I don't know how to go about checking if the correct assemblies are loaded or used.

Any ideas?

UPDATE: Not a real solution but the best I could do quickly was to reinstall Windows 7

Best Solution

Try to force the right compiler in all projects of your solution :

  1. Properties
  2. Build
  3. Platform target
Related Question