Unable to determine application identity call? How

2019-08-06 14:49发布

I am making a windows phone 8 application and in the designer view in both blend and VS I get "Unable to determine application identity call" error as a dialog box.

From what I read on stack this is propably because of the Isolated Storage is getting run and the designer can't handle it.

I am wondering is there away I can get some line numbers or something where the errors are happening instead of having to manually go through the code?

enter image description here

3条回答
神经病院院长
2楼-- · 2019-08-06 14:52

Just answered in my basic question.

I'm afraid, i don't know how to get exact string number, just keep in mind that Designer cant have an access to the IsolatedStorage and check all places where you're working with IsolatedStorage. Basically, what you need to do is to add to all constructors a lines

if (ViewModelBase.IsInDesignModeStatic)
    return;

If you're working with MVVM Light, or

if (System.ComponentModel.DesignerProperties.IsInDesignTool)
    return;

which is pretty the same but without MVVM Light.

Also, i edited my answer there.

查看更多
孤傲高冷的网名
3楼-- · 2019-08-06 15:07

Isn't this Unable to determine application identity of the caller? or Getting Unable to determine application identity of the caller Error are the same topic????

Don't know, just asking...

Sorry for any inconvenience..

查看更多
叛逆
4楼-- · 2019-08-06 15:16

By the time you see this message box it is already too late, the exception was caught and handled. You have to catch it when the exception is raised. Which is not so easy to do at design time.

One technique that's worth a shot is to use a debugger to debug Visual Studio itself. Start it again and use Tools + Attach to Process. Locate the first devenv.exe in the list of processes and select it. Set the Attach to: setting to "Managed (v4.5, v4.0)" and click OK. Let it trundle to find the PDBs (takes a while). Debug + Exceptions, tick the Thrown checkbox for CLR exceptions.

Switch back to the original instance of VS and do whatever you did before to trigger the error. The 2nd instance will break in when the exception is thrown. Which some luck you'll see your code on the Call Stack window. If the debugger doesn't break then repeat the exercise but attach to XDesProc.exe, the XAML designer. Good luck with it.

查看更多
登录 后发表回答