The old version thing -- I don't know what would cause that. If you are changing something in your database, are you pushing the update as a required update, so the user can't skip it? To do that, look in the Update dialog, and set the minimum version equal to the one you are deploying.
If that doesn't help, try clearing the ClickOnce cache and reinstalling. To clear the cache, get a copy of mage.exe, copy it to the machine, and run it with the parameter -cc, like this: $ mage -cc
mage.exe can be found in the microsoft sdks folder under program files, assuming you've installed any of the windows sdks of vs2008 or vs2005.
We didn't put a try/catch around the whole application. We subscribe to the UnhandledExceptionEventHandler and the ThreadExceptionEventHandler, and handle them. That way if an exception is thrown that makes the appilcation close, we almost always get a message. If you changed the database format and the user skipped the update, that could explain a lot.
AppDomain adCurrent = AppDomain.CurrentDomain;
adCurrent.UnhandledException +=
new UnhandledExceptionEventHandler(adCurrent_UnhandledException);
System.Windows.Forms.Application.ThreadException +=
new ThreadExceptionEventHandler(Application_ThreadException);
then we handle it
static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
{
//If you use Application.Exit instead of Environment.Exit,
//it leaves the app in the process list.
//you could log it or send yourself an e-mail with the error
Environment.Exit(-1);
static void adCurrent_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
//Log it or send yourself an e-mail with the error
Environment.Exit(-1);
}
I don't think your problem is caused by the propagation of .NET 3.5 SP-1 by Microsoft. We have a lot of users all over the world, and haven't had any problems with the versioning. We also push all updates to the public as required so they can't skip it.
The machines that are having the problem -- are they Vista or XP?
RobinDotNet
Click here to visit my ClickOnce blog!Microsoft MVP, Client App Dev