类型“属性"是在未引用的程序集中定义的-Xamarin [英] The type 'Attribute' is defined in an assembly that is not referenced - Xamarin

查看:106
本文介绍了类型“属性"是在未引用的程序集中定义的-Xamarin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我将Xamarin Forms PCL项目中的Xamarin.Forms版本从2.x升级到3.x之后,我收到以下错误消息,阻止了我构建UWP项目.

类型'Attribute'是在未引用的程序集中定义的.您必须添加对程序集'netstandard,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = cc7b13ffcd2ddd51'的引用

奇怪的是,我可以构建AndroidiOS项目.

有什么想法可以使UWP项目正常工作吗?

解决方案

在这种情况下,我将UWP SDK的最低版本更改为1709(Fall Creators Update)Build 16299,并且能够再次构建我的UWP项目./p>

以前,我使用的是较低的UWP SDK版本.

如您所见此处在此版本中,Microsoft添加了对Windows.NET Standard 2.0支持.

After I upgraded the Xamarin.Forms version in my Xamarin Forms PCL project from 2.x to 3.x I got the following error message which prevent me from building the UWP project.

The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

The strange thing about this is that I could build the Android and iOS projects.

Any ideas what I could do to get the UWP project working, too?

解决方案

In this case I changed the min version of the UWP SDK to 1709 (Fall Creators Update) Build 16299 and I was able to build my UWP project again.

Previously I used a lower UWP SDK version.

As you see here in this version Microsoft added .NET Standard 2.0 support for Windows.

这篇关于类型“属性"是在未引用的程序集中定义的-Xamarin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆