5

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.

Community
  • 1
  • 1
Stuart
  • 66,722
  • 7
  • 114
  • 165

1 Answers1

7

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!

jpobst
  • 9,982
  • 1
  • 29
  • 33
  • Thanks. Someone just emailed your blog link to me too. Will try it out tonight. +1 – Stuart Apr 22 '12 at 07:41
  • It doesn't seem to be working for me - but it could just be tired eyes missing something obvious... will try again tomorrow... – Stuart Apr 22 '12 at 17:09
  • 1
    Finally have this working now - there was a typo in the blogpost that had me stumped for a couple of days - Framework needs a capital F and DisplayName a capital D :) Thanks! – Stuart Apr 26 '12 at 15:27