12

I have got a Class Library project where I keep some interfaces and classes for my WPF Application and RIA Services.

Into the one of class I want to add a member

Brush BackgroundColor { set; get; }

or

SolidColorBrush BackgroundColor { set; get; }

But I got this error.

Error 2 The type 'System.Windows.Freezable' is defined in an assembly that is not referenced. You must add a reference to assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

What's up?

How to fix it if under Add Reference window I cannot see that assembly at all?

STF
  • 1,485
  • 3
  • 19
  • 36
NoWar
  • 36,338
  • 80
  • 323
  • 498

1 Answers1

29

The solution is simple. Just add references to the following three DLLs:

WindowsBase.dll

PresentationFramework.dll

PresentationCore.dll

In .Net 4.5, these DLL's typically reside in a directory with a name similar to: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5

John
  • 5,735
  • 3
  • 46
  • 62
NoWar
  • 36,338
  • 80
  • 323
  • 498