简体   繁体   中英

What are the NuGet package abbreviations for Xamarin.iOS and Xamarin.Android?

I'm in the process of retargeting my NuGet package for Xamarin.iOS (both classic + unified APIs) and Xamarin.Android. My question is, what would be the proper directory name to put the assembly under before publishing it? For example, right now I have:

portable-net45+win+wpa81

because my PCL targets .NET Framework 4.5, Windows 8 and Windows Phone 8.1. What do I add to this to make sure that my package can be installed on Xamarin platforms?

I found out the proper abbreviations after substantial digging through the NuGet documentation , but it doesn't mention Xamarin.

Well, looks like I answered my own question before I got to post it. The answer is

portable-net45+win+wpa81+MonoAndroid10+xamarinios10+MonoTouch10

For future reference: I remembered I didn't find the proper abbreviations out through the docs, but through my own ingenuity:

  1. Make a new PCL that targets said platforms

  2. nuget spec Foo.csproj

  3. Retouch as needed

  4. nuget pack Foo.csproj

  5. Rename Foo.nupkg to Foo.zip

  6. Open zip file (or extract && open)

  7. Proper name for directory is in lib folder (replace %2B with + as needed)

Hope that helps!

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