Restart WPF application after click-once update (start the new version)

Sawan picture Sawan · Mar 13, 2011 · Viewed 10.1k times · Source

How to restart WPF application after it has been updated using click-once, i need to start the new version!

Answer

GoldenTao picture GoldenTao · Mar 14, 2011

There are a few ways but most don't work correctly, they end up reopening the old version.

It's going to sound crazy that WPF doesn't have a proper way to handle it (#fixwpf), but you'll need to reference System.Windows.Forms.dll and call System.Windows.Forms.Application.Restart();

A quick search found Rob Relyea's post about the same thing (XAML, WPF Microsoft Guy) http://robrelyea.wordpress.com/2007/07/24/application-restart-for-wpf/