Does anyone actually use shared projects in Xamarin.Forms? I'm not new to XAML, MVVM or even shared projects, just new to Xamarin. And I'm having problems with the simplest things - leading me to think I must have fallen on my head in my sleep last night. At first I tried some fairly complex solutions and had so many issues that I've reduced it to utter simplicity by reading the "Introduction to Xamarin.Forms" and "Getting Started with XAML" articles on the Xamarin site. Here's what I've reduced it to:
- I create a new solution (in Xamarin Studio 5.2 build (386) using the Blank App template. I've done both Portable and Shared - more on that in a bit.
- Without touching a line of code I run the app on an Android 4.0.3 emulator. So far so good.
- I click on either the shared or portable project and add a new file using the Forms ContentPage XAML template and accept the default name of MyPage.
- I alter the GetMainPage method of App to "return new MyPage();" That's it - nothing else.
Here's where things get weird. If I have used the Portable template it runs just fine. But if I've used a Shared template I get a compiler error that the type or namespace MyPage can't be found. Yes, I've checked the references and they are identical in both solutions.
What am I missing? What's the secret handshake? How can something as simple as following the most rudimentary of tutorials on Xamarin's Web Site fail so miserably so early?
Thanks for any insights.