سؤال

My WPF application is crashing after we publish an update via ClickOnce with:

'The invocation of the constructor on type 'MainWindow' that matches the specified binding constraints threw an exception.' Line number '12' and line position '9'.

from Void RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)

This only happens on machines after they apply the update. A machine that gets a clean install runs fine. If you uninstall the app and reinstall it, it runs fine.

I found this question, which seems to be the same thing

In my case, if you double-click the app in the deployment folder (C:\Users\username\AppData\Local\Apps\2.0 etc.) it runs with no issues. It only crashes if you run it by clicking the icon that is installed on the user desktop. And again, only when it has done an update.

Any advice for troubleshooting/remediating this is appreciated.

هل كانت مفيدة؟

المحلول

This makes me wonder if there's a path somewhere that's getting set when you first install, and the path no longer works when updating. You're not storing a path anywhere are you? In a settings file or config file?

نصائح أخرى

Have you tried to create a shortcut from the deployment folder, and copy it on the desktop ?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top