0

我正在尝试创建一个 Windows Phone 8.1 项目,但我收到一条错误消息The type 'WriteableBitmap' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows, Version=2.0.6.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e',但我无法在任何地方找到该程序集。

我试图让 Visual Studio 为我修复它,但随后出现了这个错误来自 Visual Studio 的错误

我的使用设置为

using eKomplet.Services;
using eKomplet.WinPhone8.Implementations;
using Microsoft.Phone;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;

失败的线路之一是var bitmap = PictureDecoder.DecodeJpeg(imageStream);,它PictureDecoder来自哪里Microsoft.Phone

我正在使用这些 NuGet 包

Acr.UserDialogs               5.2.2
Acr.XamForms.UserDialogs      5.2.2
Coding4Fun.Toolkit.Controls   2.1.8
ExifLib.PCL                   1.0.1
MR.Gestures                   1.3.4
Newtonsoft.JSON               8.0.3
Splat                         1.6.2
SQLite.Net.Core-PCL           3.1.1
SQLite.Net-PCL                3.1.1
Xam.Plugins.Settings          2.1.0
Xamarin.Forms                 2.0.0.6482
Xamarin.Insights              1.10.6
XLabs.Core                    2.0.5782
XLabs.Forms                   2.0.5782
XLabs.IoC                     2.0.5782
XLabs.Platform                2.0.5782
XLabs.Serialization           2.0.5782

我怎样才能解决这个问题?

更新
参考管理器程序集-> 框架告诉我All of the Framework assemblies are already referenced. Please use the Object Browser to explore the references in the Framework
程序集 -> 扩展告诉我No user assemblies were found on the machine
项目仅显示解决方案中的项目。
共享项目不显示任何内容
Windows Phone 8.1 -> Core 告诉我The Windows Phone 8.1 SDK is already referenced. Please use the Object Browser to explore the references in the Windows Phone 8.1 SDK.
Windows Phone 8.1 -> Extensions 告诉我

Behaviors SDK (XAML)                                          12.0
Microsoft Visual C++ 2013 Runtime Package for Windows Phone   12.0
Microsoft Visual Studio Test Core                             14.0
MSTest for Managed Projects                                   14.0
SQLite for Windows Phone 8.1                                  3.13.0

浏览什么也没显示

更新 2此行
也出现此问题,所以我认为它一定与此 XLabs 问题有关。但是有没有人找到解决方法或解决方法?App.xaml.csnew XFormsAppWP().Init(this);

更新 3
我使用过PictureDecoderfrom Microsoft.Phone,但您只能Microsoft.Phone在 Silverlight 项目中使用。在 Windows Phone 8.1 中,您必须使用BitmapDecoder.

4

0 回答 0