你好,我是一个C#开发人员,我的一个dll将被用于一个安静的vee程序。
遇到的一个问题是我的dll实际上只是一个C库的包装器,我不得不包含非托管/不安全的代码。
我收到错误“无法获取详细的程序集信息[...] System.IO.FileLoadExcep
tion:无法加载文件或程序集[...]或其中一个依赖项。无法授予最小权限请求。”
每当我想在网络文件夹上运行它。
C#库在C#程序中运行得很好。
删除不安全的代码并安全地重新编译它解决了这个问题,所以作为一种解决方法,我复制了我的C#dll并删除了有问题的部分。
但是,因为这将涉及在两个不同的库中维护相同的代码,我想知道,是否有一种在Agilent Vee中包含非托管代码的正确方法。
感谢您的帮助。
以上来自于谷歌翻译
以下为原文
Hallo,
I'm a C# developer and one of my dlls is to be used in an agilent vee program. One of the problems encountered is that my dll is actually just a wrapper for a C library and I had to include unmanaged / unsafe code. I get the error "Failed to obtain detailed assembly information [...] System.IO.FileLoadException: Could not load file or assemby [...] or one of its dependencies. Failed to grant minimum permission requests." whenever I want to run it on a network folder. The C# library works just fine from within C# programs.
Deleting the unsafe code and recompile it safely solved the issue, so as a workaround I copied my C# dll and just removed the problematic part. However, as that would involve maintaining the same code in two different libraries I would like to know, whether there is a proper way to include unmanaged code in Agilent Vee.
Thank you for your help.
0