.NET app doesn't want to run
Asked Answered
R

3

5

Okay, so, here's my problem: I have developed a .NET 4.0 (Client Profile) + SQL Server Compact application for someone and that someone reported the following issue: the application doesn't start at all. No errors, no exceptions, no messages, no nothing. The loading cursor shows up for 5 seconds, and then nothing happens. The application doesn't show up in the process tree either.

This is not the first .NET app I develop for him, so I am 100% confident that all required software has been installed on his machine (.NET 4.0 CP). I have asked him to install the runtime for SQL Server Compact 4.0, which he did, so I don't think the problem is coming from here.

I have tried sending a build with UI initialization only (no other stuff within the main form's constructor/load method). It has the same issue.

I have no idea where to look for the problem's source. Anyone here who could help me with some hints, to point me to the right direction? My guess is that the application 'tries' to start during those 5 seconds, but fails.

If you need some more info, please ask.

Reformer answered 30/9, 2011 at 12:54 Comment(1)
You will have to use problem solving skills to figure this out. You have not provided us enough information. If you want post us the startup procedure code for your application.Hindu
J
14

Try looking in Windows "Event Viewer" for some clues and send him a simple console-app (Hello World will do - maybe with simple Sql Compact test) to make really sure he got everything he needs. And if everything else fails go and check for yourself - it's sometimes the simplest things your user just don't mention.

And yes: add loging (into a simple text file will do)

Jennifer answered 30/9, 2011 at 13:1 Comment(1)
The event viewer helped! I feel dumb for not knowing about it. There was a System.IO.FileNotFound exception thrown within the main form's constructor. After some google-ing (there were no problems with the file paths I was working on within the code), the problem was caused by not properly deploying the SQL Server CE requirements. I managed to get it done by 'properly' publishing the app. It's a very small app which is to be used by a small business on very simple tasks. I don't usually 'publish' (via the VS function) such apps. Thank you for the answer.Reformer
S
5

The Event Viewer generally has good information when there is no other good information. When one of the applications I work on fail to start, this is where I look. Under the "Windows Logs", I review the" Application" and "System" Logs. Most of the time there is an error that will point me in the right direction.

Schiller answered 30/9, 2011 at 13:4 Comment(1)
Thanks! Carsten was, however, faster than you :) You do get a vote up though!Reformer
W
0
  1. First of all check that app framework is installed on PC. If you build your app using 4.5 -- 4.5 must be installed on the machine.
  2. If your app doesn't show any error -- you need to go to Event Viewer, and find last error from the Source ".NET Runtime". Look at that error message as it will contain the Exception info.
Waistcloth answered 12/1, 2019 at 7:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.