I have made an app in WPF (Visual Basic 2010 Express) that takes empty PDF and writes on him data from database and saves full PDF in folder. App works fine on Windows 8, windows Vista and Windows 7. When I have tested app on Windows XP the app didn't work, it doesn't even open it (it reports error: App has encountered a problem and needs to close.). I have than downloaded and installed Framework 4.0 and it still doesn't work. Does anyone have any ideas, what it is missing in my app, so it will work on computers that have operating system Windows XP installed? I am testing app currently on comp that has Microsoft XP Professional, version 2002, Service Pack 3.
Asked
Active
Viewed 873 times
0
-
2Did you install .Net Framework 4.0 **Full** or **Client** version? Client version is a bit stripped down and might lack a library you're using. – Amadeus Hein May 29 '13 at 10:54
-
Make sure that you were not targeting .NET 4.5 in your application. – hattenn May 29 '13 at 10:58
-
I have installed .Net Framework 4 Extended. Where can I check if I am targeting .net 4.5? – vvidmar May 29 '13 at 11:18
-
Subscribe to DispatcherUnhandledException in your App.xaml and see the exception using usual MessageBox.Show() (if you are not using any logging). The Exception will surely identify the problem. – Jatin May 29 '13 at 11:55
-
I have installed .Net Framework 4.0 Extended. I have checked and I am not targeting .NET 4.5 but 4.0. Would it help if I would target 3.5? – vvidmar May 29 '13 at 12:01
-
Can you try to run the application on XP within a debugger by any chance? If not, just make a special debug build: subscribe to [unhandled exception](http://msdn.microsoft.com/en-us/library/system.appdomain.unhandledexception.aspx) and display/log the exception information, this must help to identify the problem. – Vlad May 29 '13 at 12:15
-
make sure you have directX installed on the machine. as WPF uses DirectX underneeth. – JSJ May 29 '13 at 13:39
-
There is a good summary on version requirements here: http://stackoverflow.com/questions/4204194/is-net-4-0-compatible-with-windows-xp-sp2-or-below – Nzc May 30 '13 at 07:59
-
installing DirectX didn't solve my problem. – vvidmar May 30 '13 at 08:49
-
found my problem, it was in line, that was converting string into double from database. – vvidmar May 30 '13 at 13:00
-
Just for information, how did you find out the line which was in error when deployed on Windows XP ? – Jatin May 30 '13 at 13:28
1 Answers
-1
I am elaborating on what I commented about. Just look for the exception that is thrown and then it will be a lot eassier to solve the issue. Here is how the App.xaml should subscribe to DispatcherUnhandledException
<Application x:Class="...."
DispatcherUnhandledException="Application_DispatcherUnhandledException"/>
in the App.xaml.cs pop a MessageBox printing the Exception
private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) {
MessageBox.Show(e.Exception.Message);
}
See if you can identify the Exception and try to get some information on the same. If the exception is not relevant, try printing the InnerException too.
MessageBox.Show(e.Exception.InnerException.Message);

Jatin
- 4,023
- 10
- 60
- 107