gpt4 book ai didi

c# - 如何解决 "Native DLL libmbusmaster.dll is missing! Please deploy the DLL file into the same directory as mbusmaster.net.dll."的问题

转载 作者:太空宇宙 更新时间:2023-11-04 13:36:44 30 4
gpt4 key购买 nike

我在 .Net 中使用 FieldTalk Modbus。当我运行应用程序时,我在为 MbusTcpMasterProtocol 创建对象时遇到错误。

MbusTcpMasterProtocol mbusProtocol = new MbusTcpMasterProtocol();

错误是:

native DLL libmbusmaster.dll 丢失!请将DLL文件部署到与mbusmaster.net.dll相同的目录中。

我将 libmbusmaster.dll 作为“ExistingItem”添加到项目中,并将 mbusmaster.net.dll 作为对项目的引用。

最佳答案

将“libmbusmaster.dll”添加到您的项目并没有将其添加到“mbusmaster.dll”所在的同一文件夹中。您指定的 mbusmater.dll 位于“调试”文件夹中。当您将“libmbusmaster.dll”添加到项目时,它可能已添加到项目的根文件夹(而不是调试)。要将其添加到调试,请转到解决方案中“libmbusmaster.dll”的属性,然后选择“始终复制”或“如果较新则复制”。

关于c# - 如何解决 "Native DLL libmbusmaster.dll is missing! Please deploy the DLL file into the same directory as mbusmaster.net.dll."的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29300805/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com