Skip to main content

VS2017 遇到 UAP,Version=v10.0.10240 未引用问题的解决方案

今天在撸代码的时候,开始vs2017编译还很正常,但是过了一会儿后,突然就编译不通过了,显示

Your project is not referencing the “UAP,Version=v10.0.10240” framework. Add a reference to “UAP,Version=v10.0.10240” in the “frameworks” section of your project.json, and then re-run NuGet restore.

这个错误。我当时很纳闷,什么都没动,就突然显示这个错误了,谷歌了一圈,发现是nuget引起的,解决方法如下:

(更多…)

继续阅读

在UWP的BackgroundTask中使用多语言配置

今天在写UWP的后台任务时,想使用多语言配置,但是复制原有的AppResources这个类到后台任务中无法运行,显示

无法在没有 CoreWindow 的线程上创建资源上下文。 (Exception from HRESULT: 0x80073B27)

这个错误,发现是因为后台任务没CoreWindow 的线程,所以报错,然后我把GetForCurrentView 换为 GetForViewIndependentUse后,返回为空。

(更多…)

继续阅读