1

Need some help with a typically vague Visual Studio 2008 error.

Error:

Error 3 The type or namespace name 'Label' does not exist in the namespace 'System.Windows.Controls' (are you missing an assembly reference?)

Relevant code:

internal System.Windows.Controls.Label DescriptionLabel;

I believe it's something to do with Silverlight, but i have the SDK for Silverlight 3 installed from here http://silverlight.codeplex.com/releases/view/36060. Using Windows 7 x64 and Visual Studio 2008 SP1.

I am not missing any assembly references in any projects as far as I can tell.

Brock Woolf
  • 46,656
  • 50
  • 121
  • 144

3 Answers3

2

Make sure you referenced the System.Windows.Controls.Data.Input.dll assembly in your project.

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298
2

It seems that Microsoft have removed label or its been renamed in Silverlight 3. I was under the assumption that the project needed Silverlight 3, but in fact it uses Silverlight 2.

Installing Silverlight 2 Toolkit March 2009 solved the problem.

Brock Woolf
  • 46,656
  • 50
  • 121
  • 144
1

I'd recommend taking a look here: Is there no Label control in Silverlight?

Seems that if you're targeting SL2 there is no Label control, and if you're targeting SL3 you need to download the toolkit.

Community
  • 1
  • 1
Brian Driscoll
  • 19,373
  • 3
  • 46
  • 65