问题
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