Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I build a targetting pack for Portable Class Libraries?

I'm building some code with these portable class libraries at present.

I'm looking to target full .Net, WinRT Metro, Windows Phone, ... and then MonoTouch and MonoDroid. My experiments today show this can work - http://slodge.blogspot.co.uk/2012/04/experiments-with-portable-class.html

However, I have hit a fairly significant problem - MonoTouch and MonoDroid currently support these libraries in that you can consume PCLs as binary assemblies, but they don't allow linking between project files

  • e.g. I can reference MyLib.dll from a MonoDroid project, but I can't reference MyLib.csproj.

This is a problem as it means automated (resharper) refactoring doesn't work - and I seem to rely on this for most of my work!

I've seen that Microsoft publish targetting packs that allow you to extend class libraries, but I've not worked out where these install to or what they modify.

Here's the current Microsoft list: http://msdn.microsoft.com/en-us/hh487282.aspx

Does anyone have any knowledge about what these packs contain or how someone might make their own pack? If they're not too overly complex, then I would like to have a go at producing one for MonoTouch and/or MonoDroid.

like image 984
Stuart Avatar asked Apr 21 '12 18:04

Stuart


1 Answers

This has come up a few times recently, so I wrote a blog post that should do what you want:

http://jpobst.blogspot.com/2012/04/mono-for-android-portable-libraries-in.html

Please let me know if have any issues!

like image 76
jpobst Avatar answered Sep 22 '22 16:09

jpobst