0

Whenever I have some changes regarding my DLL project, it's obvious that the dll file is having as well some changes.

But? Since I "load" it in an APP, it was saying to me that it's missing from my computer. The error has been fixed by copying and pasting the generated dll file in C:\Windows , which is not a good idea to do everytime I make changes in the dll file.

Is there a code algorithm that would copy everytime my file.dll into the folder of Windows?

4

1 回答 1

1

根据你的情况:

  • 如果您在同一个解决方案中有 dll 和 app 项目,请将 app 标记为依赖项目,并使它们都将二进制文件放入同一个文件夹中。

  • 否则,将构建后步骤添加到您的 dll 项目中,以将 dll 文件复制到 app exe 文件所在的同一文件夹中。

  • 或者,将 dll 的位置添加到PATH环境变量中。

于 2013-10-04T08:18:44.747 回答