错误“找不到指定的方法”发生 [英] the error "can not find the specified method" occurs

查看:72
本文介绍了错误“找不到指定的方法”发生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

那里,

我写了一个.dll文件(我们可以称之为x1.dll),并在项目中被引用,它工作正常。

I write a .dll file( we can call it x1.dll), and being referenced in a project, it works fine.

但当我修改x1.dll中的内容时,如下所示:

but when i modify something in the x1.dll, as following:

将方法a1重命名为a2,然后添加一个名为a1,build的新方法解决x1.dll。

rename a method a1 to a2, then add a new method which named a1, build the solution to x1.dll.

然后在一个项目中,引用新建的x1.dll,出现错误:"找不到指定的方法"

then in a project, reference the new built x1.dll, the error occurs :"can not find the specified method"

推荐答案

如果在库中进行重大更改(例如重命名成员),则所有相关代码也必须重新编译。因此,您需要重建所有项目。

If you make a breaking change in a library such as renaming a member then all dependent code has to recompile as well. So you'd need to rebuild all the projects.

发布您修改的代码以及尝试使用它的代码将使我们能够快速识别您的问题。

Posting the code that you modified and the code that is trying to use it would allow us to quickly identify your issue.

Michael Taylor

http://www.michaeltaylorp3.net

Michael Taylor
http://www.michaeltaylorp3.net


这篇关于错误“找不到指定的方法”发生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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