安装程序中的Dll C#,用于访问VBA中的部署 [英] Dll C# in installer for deployment in access VBA

查看:92
本文介绍了安装程序中的Dll C#,用于访问VBA中的部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。

我在Windows 7中使用内置VS2015 MS的C#中使用SendGrid C#库发送电子邮件。在开发过程中,我在Access vba中引用了VS2015创建的bin文件夹。它按要求工作。接下来,我使用VB2015构建了一个安装程序,将其安装在同一台开发计算机中,并将Access vba引用更改为已安装目录中的.tlb文件。开发计算机中的Access应用程序将继续按要求运行。



现在,在生产计算机SO Windows 8中安装程序运行没有问题,并且对Access vba中的.tlb的引用进行编译。但是,当调用依赖于dll的函数时,Access vba显示错误429无法创建ActiveX对象。



我尝试过:



在生产计算机中,我试图使用RegAsm.exe手动注册dll,但它显示错误说组件或其中一个依赖项不是找到了,没有更多细节。

依赖项在安装程序中,因为我可以在生产计算机的安装文件夹中看到它们,它们与开发计算机中使用的相同。



还有什么其他的事情要做或检查?

解决方案

这里的关键是错误信息:未找到程序集或其中一个依赖项。



如果您在.DLL代码中使用第三方库.DLL,则必须在安装程序中使用.DLL发送第三方库

Hello.
I have a dll in C# built in VS2015 MS in Windows 7 that sends email using the SendGrid C# library. During development I had a reference in Access vba to the bin folder created by VS2015. It works as required. Next, I built an installer with VB2015, installed it in the same development computer, and changed the Access vba reference to the .tlb file in the installed directory. The Access application in the development computer continues working as required.

Now, in the production computer SO Windows 8 the installer runs with no problems and the reference to the .tlb in Access vba compiles. However when the functions depending on the dll are called, Access vba shows an error 429 ActiveX Object can't be created.

What I have tried:

In the production computer I was trying to register manually the dll using RegAsm.exe but it display an error saying the assembly or one of its dependencies were not found, with no more detail.
Dependencies are in the installer, as I can see them in the installation folder of the production computer and they are the same ones used in the development computer.

What other thing to do or check?

解决方案

The key here is in the error message: "the assembly or one of its dependencies were not found".

If you're using a 3rd party library .DLL in your .DLL code, you have to ship that 3rd party library with your .DLL in your installer.


这篇关于安装程序中的Dll C#,用于访问VBA中的部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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