【发布时间】:2017-01-15 06:18:38
【问题描述】:
我正在使用 Windows 10 和 Visual Studio 2015 进行开发,并针对 Android、iOS、Windows Phone、Windows Universal。
我想使用 XLabs SecureStorage 服务。
我正在使用 XLabs.Platform 包 2.3.0-pre02。
在这一行我遇到了异常(仅适用于 UWP)
secureStorage.Store(key, Encoding.UTF8.GetBytes(value));
异常详情如下:
文件名:System.Runtime.WindowsRuntime,版本=4.0.11.0,文化=中性,PublicKeyToken=b77a5c561934e089
HResult:-2146234304
帮助链接:空
InnerException:空
消息:无法加载文件或程序集“System.Runtime.WindowsRuntime, Version=4.0.11.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (HRESULT 异常:0x80131040)
来源:XLabs.Platform.UWP
SourceTrack:在 XLabs.Platform.Services.SecureStorage.d__6.MoveNext()
在 System.Runtime.CompilerServices.AsyncVoidMethodBuilder.StartTStateMachine
在XLabs.Platform.Services.SecureStorage.Store(String key, Byte[] dataBytes)
在UWPTest.SecureStorageService.Store(String key, String value, Boolean overwrite)
【问题讨论】:
-
XLabs 仍在进行中。在 UWP 方面更是如此。您可能需要为 UWP 手动实施服务。
-
如果你能通过 Github 分享这个样本就好了。这样就更容易找出实际问题。
标签: xamarin xamarin.forms uwp xlabs