C# 无法确定调用方的应用程序标识-适用于其他计算机

C# 无法确定调用方的应用程序标识-适用于其他计算机,c#,debugging,isolatedstorage,C#,Debugging,Isolatedstorage,当尝试调试应用程序时,代码行 using (IsolatedStorageFile scope isolatedStorageFile.GetUserStoreForApplication()) 正在返回异常 System.IO.IsolatedStorage.IsolatedStorageException: 'Unable to determine application identity of the caller.' 问题是我们团队中的所有其他开发人员都能成功地调试代码。这意味着代码

当尝试调试应用程序时,代码行

using (IsolatedStorageFile scope isolatedStorageFile.GetUserStoreForApplication())
正在返回异常

System.IO.IsolatedStorage.IsolatedStorageException:
'Unable to determine application identity of the caller.'
问题是我们团队中的所有其他开发人员都能成功地调试代码。这意味着代码没有问题,但问题出在我的机器上。

我让它工作(尽管我不知道发生了什么)


尝试在VS2017中调试应用程序时发生异常。在VS2015中调试应用程序时,它会成功运行。

尝试打开项目属性,在“安全”选项卡上启用ClickOnce安全设置。Laslos可能重复:该设置已启用Jeroen:我已确认这不是问题所在。当
AppDomain.CurrentDomain.ActivationContext
null
时,会准确引发异常,如果代码没有在ClickOnce上下文中运行,通常会出现这种情况。您可以尝试研究工作案例中此属性中的内容。