开发者

Silverlight with Visual Studio 2010 Isolated Storage Error

I am getting an error when trying to access isolated storage when running a Silverlight unit test project in VS2010.

Test method Silverlight_Binary_Serialization_Tests.SerializationTests.SerializeBytesTest threw exception: System.IO.IsolatedStorage.IsolatedStorageException: Unable to determine application 开发者_如何学运维identity of the caller.

Here is the line it is failing on:

private readonly IsolatedStorageFile _store = IsolatedStorageFile.GetUserStoreForApplication();


If there's no actual host for the class library then the unit test won't be able to determine the application store as there's no actual application as such.

Does the code work when referenced from a Silverlight app? If so I'd suggest it's the above.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜