views:

265

answers:

2

I have done a WPF appliction using VS 2008 SP1 in Windows XP SP3. I copy the exe and dlls to my Windows 7 RC build 7100 machine. But the exe is not working. When I doubleclick on the exe, a message comes like 'Application stop working. windows is gathering the information'. Why this happends?

I am overriding the OnStartup function in App.xaml.cs to create single instance of application. and also I am using DllImports for kernel32.dll, powrprof.dll, advapi32.dll and user32.dll. I use a Date control from the WPFToolkit

+1  A: 

Given that you are importing kernel32.dll, powerprof.dll, advapi32.dll, and user32.dll, my first guess is that you are running into a DLL-Hell problem. There is no concurrent versioning of those DLL's like there is with .NET assemblies. Make sure that the signatures you are importing have not been broken in the version of Windows 7 you are using.

jrista
+1  A: 

Have you tried to run in Backwards Compatibility Mode, by Right clicking the exe and going to the Compatiblity tab and trying different settings?

Also, did you test in more than one Windows 7 machine, to actually confirm its due to the Operating System difference and not due to a possible Framework installation problem?

silverCORE