Cannot run 32bit compiled WPF applications on Windows 7 64bit
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 load开发者_运维问答ing 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
Try to force the right compiler in all projects of your solution :
- Properties
- Build
- Platform target
Try forcing Windows to always use the 32bit CLR and see if it still crashes:
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe setwow
-Oisin
I think I ran into this issue also. If I remember correctly, I had a problem where a dependency was compiled for x86 and the main app was compiled for x64, or the other way around. i.e. say I had a library and an app with a main function. I think they both need to compiled the same way. i.e. I don't think you can mix and match. This might not have been the exact same issue. I would go through all the projects in the solution make sure they all have the same settings.
精彩评论