InternalsVisibleTo is not working for wpf applicat

2019-07-17 09:00发布

问题:

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.

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

回答1:

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