Information générale
Catégorie:
Code, syntaxe and commandes
>>>I'm calling Application.Restart(). On my development PC this works (of course) but on my test box the app shuts down but doesn't restart.
>>>Are you sure that it shuts down (cleanly and completely)?
>From what I can see yes. I look in TaskMan and it's gone.
Can you check whether the new instance makes *any* attempt to start (e.g. does Main() run) ? No exception handling that might conceal startup problems? Bear in mind that the new instance starts up before the old one is fully disposed - could the old instance be preventing the new from accessing some resource?
>>>Can I ask why you are using Restart() ?
>I'm detaching & reattaching the app from the DB.
Using Restart() sounds like a pretty drastic way of achieving that? I've only used Restart() in situations where the binaries have changed (e.g. ClickOnce deployment)
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement