Application identity not set Exception

前端 未结 3 970
耶瑟儿~
耶瑟儿~ 2021-02-06 22:44

I have just converted a project to VS2010 and I now starting to see Exceptions in my software in IntelliTrace.

One such Exception is \'Application identity is not set\',

相关标签:
3条回答
  • 2021-02-06 23:10

    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
    
    0 讨论(0)
  • 2021-02-06 23:17

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

    0 讨论(0)
  • 2021-02-06 23:24

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

    0 讨论(0)
提交回复
热议问题