简体   繁体   中英

How can I create a NuGet package for Windows Phone 8.1 from a PCL project?

My PCL project is setup with these targets:

  1. .NET Framework 4
  2. Silverlight 5
  3. Windows 8
  4. Windows Phone 8.1
  5. Windows Phone Silverlight 8

I created the PCL target for my nuspec file using the NuGet Package Explorer .

My target looks like this: lib\\portable-net4+sl5+wp8+win8 .

If I create a Windows 8 test project, I can find the latest version of my library in NuGet. If I create a Windows Phone 8.1 project, this version does not show up.

What am I doing wrong here?

According to NuGet documentation (please take a look here at "Common Framework and Profile Targeting Examples" section) you need to add wpa to your target to make it work. Please be also aware that wpa target works only with NuGet 2.8.1+

Those same profile targets are what is used for the items in the portable profile target.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM