C# &引用;无法为应用程序存储区确定程序集“;隔离存储异常
我在尝试运行以下代码时遇到此异常(标题):C# &引用;无法为应用程序存储区确定程序集“;隔离存储异常,c#,isolatedstorage,C#,Isolatedstorage,我在尝试运行以下代码时遇到此异常(标题): public static String WriteSettings(String fileName, String settings) { try { using (IsolatedStorageFile settingsStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStor
public static String WriteSettings(String fileName, String settings)
{
try
{
using (IsolatedStorageFile settingsStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null))
{
using (StreamWriter writer = new StreamWriter(new IsolatedStorageFileStream(fileName, FileMode.Create, settingsStore)))
{
writer.Write(settings);
}
}
}
catch (Exception e)
{
return "Cannot save settings. The following error has occurred: " + e.Message;
}
return "Settings saved";
}
发生异常的行是:
using (IsolatedStorageFile settingsStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.Assembly | IsolatedStorageScope.User, null))
非常感谢您的帮助 解决这个问题有什么进展吗?这是很久以前的事了,恐怕我不记得是怎么解决的了。您是否遇到相同的问题?如果你提供一些上下文,也许我可以帮上忙。看看这里的异常表:坦率地说,我称之为GetStore(IsolatedStorageScope.Roaming | IsolatedStorageScope.User,null)的“证据”是什么意思还不是很清楚,并得到了相同的异常。找到了关于ISF的好文章: