How to fix Error Getting Design Time Data in Blend with MVVM-Light

I ran in to this recently and couldn’t find anything online about it.

Using MVVM-Light for Windows Phone development and Blend. It works fine in Visual Studio, but every time I open one of my pages in Blend I get this error. 

Blend Error: Class is already registered. mvvm-light in Blend

Already registered? I’m using MVVM-Light’s integration with a Simple IoC container to manage my dependencies and so it really leaves me wondering what’s going on here. I know that I only registered this class once.. so what gives?

Fortunately for me, Laurent (the creator of MVVM-Light, fellow MVP, and all around Blend Ninja) is active on Twitter and saw my tweet.

image

image

image

image

hmm.. let’s try that…

image

and ta-day!

image

Design time data working in Blend using MVVM-light!.

Special thanks to Laurent for knowing exactly what I needed to do. Thanks my friend!

About Caleb Jenkins

Caleb Jenkins is the founder and principal mentor for Proaction Mentors, a development and architecture mentoring group. He is probably best known for his work with Microsoft Corporation as a Developer Evangelist and as a technology expert and speaker for the International .NET Association. He currently works with Sabre Airline Solutions as an Agile Coach to mentor agile teams around the globe to be more awesome. He also works as a technical editor and author for Wrox Press and as the host, cameraman and editor for CommunityCast TV. Caleb is well known for his engaging speaking style, depth of knowledge and creative energy. Caleb lives in the Dallas area where he continues to date his beautiful wife and busies himself playing Candy Land and Xbox 360 with their four incredible children. Occasionally he writes curriculum, speaks at conferences, and writes code for silly things like Twitter applications. Eventually he'll post some of the gazillion interviews that he's recorded on CommunityCast or blog at www.developingUX.com You can follow him on twitter (@calebjenkins) and if you're still reading this, then you could also subscribe to his blog RSS feed or sign up to receive updates by email