我有一个类库项目,在这里我为我的WPF应用程序和RIA服务保留了一些接口和类。
我想在类中添加一个成员
Brush BackgroundColor { set; get; }或
SolidColorBrush BackgroundColor { set; get; }但我犯了个错误。
错误2类型'System.Windows.Freezable‘是在未引用的程序集中定义的。必须添加对程序集'WindowsBase,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35‘的引用。
出什么事啦?
如果在“添加引用”窗口下看不到该程序集,如何修复该程序集?
发布于 2012-03-15 20:02:45
解决办法很简单。只需添加对以下三个DLL的引用:
WindowsBase.dll
PresentationFramework.dll
PresentationCore.dll
在Assemblies\Microsoft\Framework.NETFramework\v4.5 4.5中,这些DLL通常位于一个名称类似于: C:\Program (x86)\Reference .Net的目录中。
https://stackoverflow.com/questions/9726838
复制相似问题