UPDATE - 19 Dec 2012 - LATEST INFO IS ON
http://slodge.blogspot.com/2012/12/cross-platform-winrt-monodroid.html
----------
Three months on from hitting some severe stumbling blocks in the Portable Library support within MonoTouch, I'm pleased to say that the last two weeks have seen huge leaps forwards in the vNext version.
Right now, the Portable Library layer is now running well under all of WP7, MonoDroid and MonoTouch :)
There are still some tooling issues... but overall, this is now working really well - so I'd like to
invite users to have a play with the new projects!
Although there is some significant tooling hackery required to get portable library mvvm working, once you've done the initial hackery, then this shouldn't affect your existing workspaces and you should then be able to build and run portable versions of:
- BestSellers (WP7, Droid, Touch)
- CustomerManagement (WP7, Droid, Touch)
- SimpleBinding (Droid, Touch)
- Tutorial (WP7, Droid, Touch)
... and you might be able to run even more... :)
---
And the benefits for doing this are....
1. Simpler project structures:
2. Automated cross-platform refactoring - e.g. using resharper
3. Simpler porting to new platforms
4. A new plugin structure which makes mvvmcross lighter (smaller executables), which provides developers with more choice and which makes contributing new IoC modules more straightforward - now anyone can provide and consume new "plugins"
---
If you are interested in all this, then here's the instructions:
----
5. Install a similar file called "VSMonoTouch,Version=v1.0+.xml" in the same directory and for its content use:
(Note: this file is even hackier than the MonoDroid one - it points the portable tools at Full .Net v1.0 in line with what the VSMonoTouch plugin does!)
After you have done this.... then you should be able to load and run the WP7 and Droid samples within
MvvmCross_All.sln
... and you should also be able to build MonoTouch solutions too. And you should be able to refactor across all 3 platforms!
---
For the Mac:
Assuming you are starting with MonoDevelop with MonoTouch installed on a Mac
- search for : <targetframeworkprofile>Profile104</targetframeworkprofile>
- replace with : <targetframeworkprofile>Profile1</targetframeworkprofile>
3. Sometimes (if I've checked in the wrong .sln file version) then before opening the
MvvmCross_All.sln solution, you may need to change the first line from
Microsoft Visual Studio Solution File, Format Version 12.00
to
Microsoft Visual Studio Solution File, Format Version 11.00
After you've done these 3 steps.... then you should be able to:
- open the solution
- switch to the Debug|iPhoneSimulator branch
- run the BestSellers, CustomerManagement, SimpleDialogBinding, and Tutorial projects - other projects currently still have unresolved problems.
---
Further Notes....
- I'll be trying to get this branch fully working in the next month (that's my aim!)
- My intention is to switch all future MvvmCross development across to this portable approach
- If this happens, then I expect the existing non-portable tree will only get bug fixes - not new features.
- The exact timing of any switchover may depend a bit on tool changes from both Microsoft and Xamarin (and it may depend on clashes in my work and leisure time too!)
- There are a number of class and namespace breaking changes in the vNext (portable libraries) branch - most notably:
-- all Cirrious.MvvmCross.Android namespaces have moved to Cirrious.MvvmCross.Droid - this is to avoid name clashing issues with the global::Android namespace.
-- FirePropertyChanged has become RaisePropertyChanged - as this seems to be the more normal method name
- There are a number of fixes on the master branch which are not yet on the vnext branch
- There are a number of changes still to make in the vnext branch - e.g. IMvxServiceConsumer might switch to a simpler IMvxServiceConsumer - following a request/suggestion from @dsplaisted
- There are several dead files and directories left in the tree at present - mainly left over after refactoring - these will get tidied away soon.
- I've not yet tried much WinRT, console or PSS development on the vnext branch - so don't be surprised if those projects don't build or work!
- If anyone wants to help - with code, documentation, tools, samples or suggestions, then you are very welcome - just get in touch.
- As ever, bugs to GitHub issues please, and questions to StackOverflow :)