开发者

Silverlight with Visual Studio 2010 Isolated Storage Error

开发者 https://www.devze.com 2022-12-28 14:37 出处:网络
I am getting an error when trying to access isolated storage when running a Silverlight unit test project in VS2010.

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

精彩评论

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

关注公众号