InternalsVisibleTo不适用于wpf应用程序 [英] InternalsVisibleTo is not working for wpf application

查看:147
本文介绍了InternalsVisibleTo不适用于wpf应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在另一个程序集中设置了[assembly:InternalsVisibleTo(GuiAssembly)],但是当在同一个程序集中的类上发生wpf绑定时,它会引发异常,因为该类中的属性是内部的。

I have the [assembly:InternalsVisibleTo("GuiAssembly")] set in the other assembly but when wpf binding occurs on a class that lives in the other assembly, it throws an exception because of the property in that class being internal.

我知道这适用于其他应用程序,但不知道为什么它不适用于这个特定的WPF应用程序。

I know this works with other applications but not sure why it is not working with this particular WPF app.

推荐答案

我很确定WPF绑定的一切都需要公开。

I'm pretty sure that everything that WPF binds to needs to be public.

这篇关于InternalsVisibleTo不适用于wpf应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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