Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# &引用;无法为应用程序存储区确定程序集“;隔离存储异常_C#_Isolatedstorage - Fatal编程技术网

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的好文章: