0

I'm working on a mobile application prototype in Expression Blend 4. Up until now it has worked fine, but after re-opening the program I can no longer build the project. I get 4 errors that are all pretty much the same:

The primary reference "System.Windows.Controls.Toolkit, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7ceec85d7bea7798e" which has a higher version "5.0.5.0" than the version "2.0.5.0" in the current target framework."

Yeah, pretty lengthy error message (which I had to type out as you can't copy from the error output!). The other 3 errors are identical but refer to different .NET Framework Assemblies (System, System.Core and System.Windows)

Any pointers on how to fix this?

Chris W.
  • 22,835
  • 3
  • 60
  • 94
MartinAnsty
  • 383
  • 2
  • 9
  • Try deleting your Bin / Obj folders and rebuilding. – Chris W. Mar 12 '12 at 15:33
  • Thanks for the suggestion. In my desperation I tried deleting various items from the project and removing some of the references. Only made things worse though. In the end I decided to restart the project from scratch. – MartinAnsty Mar 12 '12 at 20:31
  • Ouch, well sorry you ended up taking the rough road to a solution. For future reference, most issues are fixable. Best of luck! – Chris W. Mar 12 '12 at 20:33
  • I'm sure there is a perfectly simple solution, but a day later I'm none the wiser as to what it is. Restarting on the other hand took around 4-5 hours. – MartinAnsty Mar 13 '12 at 00:30

1 Answers1

0

It sounds like you're trying to edit a Silverlight 5 project in Expression Blend 4. That won't work: you need the Blend Preview for Silverlight 5. Last I checked, Microsoft has not yet released final bits for this. :/

Mike Post
  • 6,355
  • 3
  • 38
  • 48
  • That was what I had been thinking, but it worked just fine previously. The errors only appeared after I reopened Blend and reopened the project. – MartinAnsty Mar 13 '12 at 00:28
  • Regardless, something is going on where Blend is trying to pick up v5 of Silverlight. I'd crack open the project file and see what version of Silverlight is targeted in the XML. I'd also remove all of the references and add them back from what you know to be the right area. Remember, v2.0.5.0 = SL4, v5.0.5.0 = SL5 – Mike Post Mar 13 '12 at 14:52