Saturday, May 1, 2010

Unity + Silverlight 4.0 + VS2010 + Prism = Heartache

Found an issue yesterday that caused me to lose half-a-day. It seems that The latest V4 drop of Prism (including the Unity container) has an issue resolving partial classes. The signature: Container.Resolve[shell]();

Would not compile - at all! Note: for those of you paying attention, replace the brackets with the appropriate greater-than, less-than signs!

It seemed as if the source code was not in sync, which is typically the case with most SL projects. Nope, was absolutely horrendous experience. Turns out someone also "discovered" the issue and promptly when to CodePlex to report it, I'd give them "props" but I am unable to link to the original issue - which for all intensive purposes is not on the site anymore. Curious.

To be fair - I wouldn't typically resolve to a concrete instance anyway, but when dealing with newness, I find it best to take smaller steps! I'm abandoning Unity for present and looking into Ninject to meet my Silverlight needs. Might consider MEF if it wasn't so attribute "dirty". It feels unclean to drive the heart of your composition framework with attributes; also I'm not sure how I feel about the sheer "randomness" of potentially IMPORTING multiple modules within a given view. Silverlight Goodness (with Blendability in mind!) Another funday morning.