I developed a WPF application and when I launch it in the debug mode I see the following in the output:
'WpfApplication1.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\WINDOWS\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll', Symbols loaded. A first chance exception of type 'System.Deployment.Application.InvalidDeploymentException' occurred in System.Deployment.dll Additional information: Application identity is not set.
If I use a control from this application in another WPF application, there are 7 such messages in the output. Nevertheless, the application works fine.
Could you explain the reason why these exceptions thrown? I found that the method ApplicationDeployment.get_CurrentDeployment
raises them. In the MSDN it is written that this exception arises when “You attempted to call this static property from a non-ClickOnce application.” I can’t understand what it means.
I found similar post InvalidDeploymentException - Application identity is not set but there is no answer to this question.