Andrew Young
Andrew Young

Reputation: 1779

Is it possible to create a stand-alone Monotouch class library?

I'm all about code reuse. One of the best ways in .NET/Mono is to create a class library. I have a few custom UIViews that I would like to place in a class library (.dll) so that I can redistribute it but for some reason I am not able to create a project that references monotouch from a stand-alone library. The only way to reference it is to create a full blown iPhone project -- not what I want.

Any help would be appreciated.

enter image description here

Upvotes: 0

Views: 759

Answers (1)

jdoyle1983
jdoyle1983

Reputation: 831

Under MonoDevelop project types C#->iPhone and iPad, I have

  • iPhone Window-based Project
  • iPhone OpenGL Project
  • iPhone Navigation-based Project
  • iPhone Utility Project
  • MonoTouch Library Project
  • Empty MonoTouch Project
  • iPad Window-based Project
  • Universal Window-based Project

You want MonoTouch Library Project. This will compile a DLL that can be referenced in another MonoTouch project.

I know this works because I have 2 projects that reference a DLL I created just for the benefit of reusing code.

Upvotes: 4

Related Questions