缺少System.Windows.Freezable [英] System.Windows.Freezable is missing

查看:1486
本文介绍了缺少System.Windows.Freezable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个类库项目,我为我的WPF应用程序和RIA服务保留一些接口和类。



进入类的一个我想添加一个成员

  Brush BackgroundColor {set;得到; } 

  SolidColorBrush BackgroundColor {set;得到; } 

但我收到了这个错误。



错误2类型System.Windows.Freezable在未引用的程序集中定义。您必须向程序集WindowsBase,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'添加引用。



如果在添加引用窗口下如何解决它?我完全看不到该程序集?

解决方案

解决方案很简单。只需添加对以下三个DLL的引用:



WindowsBase.dll



strong> PresentationFramework.dll


$ b

.Net 4.5,这些DLL通常驻留在一个类似名称的目录中:C:\Program Files(x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5


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?

解决方案

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

这篇关于缺少System.Windows.Freezable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆