反映也是项目类型冲突一部分的DLL
我目前遇到了类型冲突。我有两个项目,A 和 B。A 有 B 作为依赖项。当 A 运行时,它运行一个 OpenFileDialog 并加载给定的程序集
var assembly = Assembly.ReflectionOnlyLoadFrom(selectedPath);
然后,稍后在我的代码中,我的类型发生冲突。我选择调用一个反射函数,因为
var result = WindowData.SelectedFunction.Invoke(null, parameters);
它是一个静态函数,因此我不会为第一个参数传递对象。显然第二组是参数的object[]。
因此,引用的程序集和我(实际上不是?)加载的程序集似乎发生了冲突。这很奇怪,因为这不会在手表的调试模式下发生。
I'm currently running into a type clash. I have two projects, A and B. A has B as a dependency. When A runs, it runs an OpenFileDialog and loads the given assembly with
var assembly = Assembly.ReflectionOnlyLoadFrom(selectedPath);
Then, later in my code, I'm having my types clash. I have a reflected function I chose to invoke as so
var result = WindowData.SelectedFunction.Invoke(null, parameters);
It's a static function, so I don't pass in an object for the first parameter. Obviously the second set is an object[] of the parameters.
So it seems the referenced assembly and the one I'm (not actually?) loading are colliding. It's weird because this DOES NOT happen in debug mode in a watch.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论