WPF Applicationdeployment.isnetworkdeployed always returns false
I used ClickOnce publishing to deploy my WPF application
when i try to update manually
ApplicationDeployment.IsNetworkDeployed is always return false
so it doesn't check for updates. it cannot find the current settings
using the below method to update manually http://msdn.microsoft.com/en-us/library/ms404263.aspx
+3
source to share
1 answer
IsNetworkDeployed will only be true if the application is launched from a deployment URL (.xbap). The only reason IsNetworkDeployed returns false in a deployed application is because accessing ApplicationDeployment.CurrentDeployment throws an exception ....
To investigate your problem more deeply, you should do something like this:
try
{
string foo = ApplicationDeployment.CurrentDeployment.DataDirectory;
}
catch (Exception e)
{
MessageBox.Show("Exception: " + e.Message + "\n" + e.StackTrace);
}
+5
user1082916
source
to share