Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows dll不';似乎没有登记_Windows_Dll_Dllregistration - Fatal编程技术网

Windows dll不';似乎没有登记

Windows dll不';似乎没有登记,windows,dll,dllregistration,Windows,Dll,Dllregistration,我在VisualStudio中构建了一个dll。然后在Windows Server 2008 R2的计算机上注册dll。我使用以下命令: %windir%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /unregister .\My.Program.dll %windir%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /codebase .\My.Program.dll 我得到的信息是: 成功取消注

我在VisualStudio中构建了一个dll。然后在Windows Server 2008 R2的计算机上注册dll。我使用以下命令:

%windir%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /unregister .\My.Program.dll
%windir%\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe /codebase .\My.Program.dll
我得到的信息是:

成功取消注册

然后:

注册成功


因此,看起来dll已成功注册和注销,但当我运行使用dll的程序时。dll的行为与我期望的不一样。它似乎忽略了我在dll中所做的更改,其行为与更改前的dll相同。如何确保我的新dll正在注册?

检查进程中加载了哪些模块,查看是否从正确路径加载了正确的dll(例如,通过使用调试器或process Explorer)process Explorer很棒!哇!酷!Process Explorer显示加载的dll错误。如何加载dll?我重新启动了服务,然后再次调用该进程。这一次似乎加载了正确的dll。我也用Process Explorer进行了验证。这解决了我的问题!!非常感谢你的帮助!!