完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好。
我在VEE中使用.NET Assembly Reference菜单导入Agilent N4010A(安捷伦的WLAN测试仪器)的库。 当我编写程序时,N4010A的DLL有一个给定的版本; 现在已经改为更高版本。 我遇到的问题是用户必须在使用程序之前通过VEE中的.NET程序集参考菜单重新加载较新的DLL。 没有它,该程序不起作用(因为它在C: Program Files Agilent WLAN Test文件夹中寻找旧版本,但在那里找不到它)。 它不会自动从该文件夹中获取较新版本。 反正我是否可以在没有.NET Assembly refences菜单的手动操作的情况下自动加载该程序集? 必须有一些方法但是,我找不到它。 我试过System.Reflection.Assembly.Load但是,它似乎不起作用。 问候,乌代 以上来自于谷歌翻译 以下为原文 Hello. I use .NET Assembly Reference menu in VEE to import the libraries for Agilent N4010A (WLAN test instrument from Agilent). When I wrote the program, the DLL for N4010A had a given version; now that has changed to a higher version. The problem I have is that the user has to reload the newer DLL through .NET Assembly reference menu in VEE before using the program. Without that, the program does not work (since it was looking for an older version in C:Program FilesAgilentWLAN Test folder and does not find it there). It does not automatically pick up the newer version from that folder. Is there anyway I can load that assembly automatically without the manual operation of .NET Assembly refences menu? There must be some method but, I cannot find it. I tried System.Reflection.Assembly.Load but, it does not seem to work. regards, Uday |
|
相关推荐
1个回答
|
|
嗨。我正在开发的.NET wcf应用程序问题非常类似。每次更改版本时,Vee脚本都拒绝执行,抱怨无法导入引用。此错误信息中
尽管事实上这个dll在系统上不再存在,但是老dll的版本号总是显示出来。尽管成功运行了chamemeikuan测试脚本之后,我不确定这个问题是什么......唯一的理论 我所拥有的是,它可能与Vee使用.NET System.IO.Directory.GetCurrentDirectory()或相同的“root”复制到其执行空间,因为此命令从中提取信息,我看到很多 此命令可以返回错误路径的方式,因为这似乎是Windows中的公共变量,可由任何人或任何东西设置。然后这可能会导致副本,因为脚本是从几个不同的实验室站点(本地副本)执行的,并且 脚本执行的路径并不总是如此 相同(但dll导入路径是)。但我真的抓住了这里的吸管。 因此,如果有任何人有任何想法可能是什么问题,我将非常感激.EDIT:Vee中显示的错误消息如下:“无法加载文件或程序集'*旧的DLL版本和此处显示的PublicKeyToken *'” 程序集的清单定义与程序集引用不匹配。 (HRESULT异常:0x80131040)“//Björn 以上来自于谷歌翻译 以下为原文 Hi. I am having very similar issues with a .NET wcf application that we are developing. Every time a version is changed the Vee script refuses to execute, complaining about not being able to import the reference. And also, in this error message the version number of the old dll is always shown, despite the fact that this dll does not exist on the system any more. Although after running changmeikuan test script successfully, I am not sure what the issue is any-more... The only theory that i have is that it may have to do with Vee making a copy to its execution space using the .NET System.IO.Directory.GetCurrentDirectory( ) or the same "root" as this command extracts info from, and I have seen many ways that this command can return erroneous paths since this seems to be a public variable in windows, settable by anyone or anything. And that this may then cause a copy because the script is executed from several different lab-stations (local copy), and the path to script execution is not always the same (but the dll import path is). But I am really grasping for straws here. So if anyone have any idea's what could be the problem I would be really grateful. EDIT: The error message shown in Vee is the following: "Could not load file or assembly '*old dll version and PublicKeyToken shown here*' "The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)" //Björn |
|
|
|
只有小组成员才能发言,加入小组>>
1221 浏览 0 评论
2346 浏览 1 评论
2155 浏览 1 评论
2021 浏览 5 评论
2900 浏览 3 评论
961浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
697浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
797浏览 0评论
1221浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 06:58 , Processed in 1.269944 second(s), Total 80, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号