Application identity not set Exception

我怕爱的太早我们不能终老 提交于 2019-12-03 04:20:32

If the problem is occuring in debugging you can first check if the debugger is attached before accessing any application settings:

If System.Diagnostics.Debugger.IsAttached then
       Me.Text = "Debug Mode"
Else 
       Me.Text = "Version " & My.Application.Deployment.CurrentVersion.ToString
End If

I found that this problem exists only if you untick "Just My Code" under debug options.

If this is a ClickOnce application being debugged, another option is to check the System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed setting.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!