I am trying to build up a set of class libraries to share code between applications that we're going to make.
However, I am unable to create the projects correctly and I can't see what I'm doing wrong.
Let me go through the steps I use to reproduce this, maybe someone here can see what I'm doing wrong:
- In a fresh MonoDevelop instance, I go to File->New Solution
- I pick the MonoTouch Library Project template, and give it an appropriate name
- I then add a new application project to the solution (to simulate using the library in an app), of type "iPhone Single View Application"
- I make the application project the startup project
- I add a reference to the library project in the application project
- I then build
This works, and if I pick the Run->Debug menu item, I can see the application opening up in the simulator.
Let's assume I want to test it on the iPhone now, so I visit the dropdown in the toolbar, pick "Debug|iPhone" build target, and immediately the class library project is grayed out with:
(not built in active configuration)
If I right-click the solution, check the Configuration mappings, when picking anything related to the simulator or the iPhone, the class library disappears from view altogether and is unable to select for build.
The build target dropdown also has 6 items now, Debug, Release, Debug/release for iPhone and Debug/release for the simulator. Apparently only the Debug and Release that is not for either iPhone or the simulator ends up building the class library.
What am I doing wrong here?
In a different project where I did not have the luxury of being able to look around for a solution, I ended up creating an empty universal project, is that the "correct" way to mitigate this?