The type 'Attribute' is defined in an assembly that is not referenced - Xamarin

你说的曾经没有我的故事 提交于 2020-01-15 08:24:02

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/51211144/the-type-attribute-is-defined-in-an-assembly-that-is-not-referenced-xamarin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!