2

I have a class library project (developed in VS) which I want to share with a MonoTouch project I'm working on. The problem is that when I try to add a reference to the library project in MonoDevelop an error is displayed saying 'Incompatible target framework: v.NETFramework,Version=v3.5)'.

From what I've read on the web I have to create another class library project in MonoDevelop and then link all the project files from the original into it...I'll do this if I have to but i'd rather have a cleaner solution to this, if not a simple project file fix then maybe a script I can run...

Regards Lee

LeeAlexander
  • 186
  • 8

2 Answers2

2

You do have to create a class library project in MonoDevelop. The library has to be compiled with the MonoTouch version of the framework.

The reason for this is MonoTouch framework is based on the Silverlight lightweight version of the .NET framework.

See here http://docs.xamarin.com/ios/about/assemblies for more info.

Scott
  • 21,211
  • 8
  • 65
  • 72
2

A Portable Class Library would be the way to go, but unfortunately not yet properly supported in the current version of MonoDevelop with MonoTouch. Work seems to be in progress though.

Community
  • 1
  • 1
Bart Verkoeijen
  • 16,545
  • 7
  • 52
  • 56