refs:
https://blog.csdn.net/zhang_bamboo/article/details/5876592
System.Windows.Freezable 在未被引用的程序集中定义
报错信息如下:
解决方法 添加windowsbase.dll 引用
Freezable 類別
Defines an object that has a modifiable and a read-only (frozen) state. Classes that derive from Freezable provide detailed change notification, can be made immutable, and can clone themselves.
命名空間: System.Windows
組件: WindowsBase (在 windowsbase.dll 中)
XML 命名空間: http://schemas.microsoft.com/winfx/2006/xaml/presentation
遇到链接文章类似问题,bi.beginInit等要求 windowBase,但解决方案不尽相同。
出现这个问题是,因为把IValueConvert类型,单独拎出来做了一个公用库,缺少了原来项目中的依赖。
经尝试发现放在原来项目中是可以的,而单独的项目中是不行的。
解决方法:把原项目的依赖添加到公共项目中,直接编辑项目文件比较即可。
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 CS7069 对类型“Freezable”的引用声称该类型是在“WindowsBase”中定义的,但未能找到 CannyCameraApp.Common.Utility D:\xxx\App\Common\App.Common.Utility\ValConvert\ImageValueConverter.cs 30 活动