[英]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.我正在为 Xamarin.iOS(经典 + 统一 API)和 Xamarin.Android 重新定位我的 NuGet 包。 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.因为我的 PCL 面向 .NET Framework 4.5、Windows 8 和 Windows Phone 8.1。 What do I add to this to make sure that my package can be installed on Xamarin platforms?
我要添加什么来确保我的包可以安装在 Xamarin 平台上?
I found out the proper abbreviations after substantial digging through the NuGet documentation , but it doesn't mention Xamarin.我在大量挖掘NuGet 文档后找到了正确的缩写,但它没有提到 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:供将来参考:我记得我没有通过文档找到正确的缩写,而是通过我自己的独创性:
Make a new PCL that targets said platforms制作一个针对上述平台的新 PCL
nuget spec Foo.csproj
Retouch as needed根据需要润饰
nuget pack Foo.csproj
Rename Foo.nupkg
to Foo.zip
将
Foo.nupkg
重命名为Foo.zip
Open zip file (or extract && open)打开 zip 文件(或提取 && 打开)
Proper name for directory is in lib folder (replace %2B with + as needed)目录的正确名称在 lib 文件夹中(根据需要将 %2B 替换为 +)
Hope that helps!希望有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.