Method not found: ‘System.Collections.Generic.IDictionary`2 System.Web.Mvc.ModelBindingContext.get_ValueProvider()’

After upgrading an MVC v1.0 project to MVC v2.0 I started getting the following error:

 

 

Method Not found: MVC error

Method Not found: MVC error

 

Turns out this error is caused by the MVC Futures v1.0 Data Annotations library.

The Fix:

  • Remove the reference to System.ComponentModel.DataAnnotations
  • Remove the reference Microsoft.Web.Mvc.DataAnnotations, this is now included as part of MVC 2.0
  • Add a reference to c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.ComponentModel.DataAnnotations
  • Remove the line in Global.asax for setting the default ModelBinder to a new instance of Microsoft.Web.Mvc.DataAnnotations.DataAnnotationsModelBinder.

Book Review – Foundation Expression Blend 3 with Silverlight

 

I have worked my way though most of this book and I have found it very helpful in getting started with Blend. In Foundation Expression Blend 3 with Silverlight, Victor Guidioso has assembled an excellent collection of examples that walk you through creating Silverlight applications from scratch using a combination of Blend and Visual Studio. This book is written in a style that emphasizes jumping right in and getting the job done. There are no gratuitous “video in a button” type examples here but examples based on the types of projects you are most likely to write. I found an error in the book which had a bad link for a source code download URL so I sent an email. To my surprise, not only did I get a reply email notifying me the link was fixed, Victor called me to let me know. You can’t ask for anything better than that! Anyway, I found this book extremely helpful in getting started writing Silverlight applications with Blend and I think you will too!

Coding for simplicity

When NASA designed the lunar module for the Apollo 11 mission for the first ever attempt to land men on the moon, they were challenged to create a reliable engine for lifting off the lunar surface and the return journey home. The engine absolutely had to work. If the engine failed, there was no hope of rescue and probably little the astronauts could do to attempt a fix. A failed engine would mean more than just a failed mission, it would be the end of the astronauts lives and a spectacular failure to NASA and an embarrassment to the United States in the midst of the cold war. NASA engineers decided to approach this problem by creating the simplest engine they could conceive. It had no moving parts and lacked even a spark plug. The fuel for the engine would ignite by simply mixing its individual components together. This, along with countless other engineering decisions, eventually led to the first successful moon landing and the rest is history.

The philosophy of designing for simplicity can described as the KISS principle, Keep It Simple Stupid, or it can be a corollary to Occam’s Razor in that the simplest solution is usually the best. This philosophy is what is behind Google becoming a billion dollar company based on a text-box and a submit button. This is also my personal philosophy for creating websites. All things being equal, I tend to implement functionality with lots of simple pages as opposed to fewer, more complex pages.