项目原因需要先从labview的图纸里面导出dll。现在遇到这样一个问题:有一个labview工程,其中一个vi的程序框图引用了附加工具包:[sound and vibration toolkit],这个工具包我也已经安装了,可以使用labview查看vi的完整程序框图,但是导出成.net dll之后,使用C#编写调用labview导出的dll的函数程序,编译通过,但是在运行的时候出异常:NationalInstruments.LabView.Interop.VIAssemblyException:Missing Dependency in:Sub VItimebase.vi:库未找到或无法加载:sndvib.dll
从异常提示看应该是函数执行时发现缺少labview的某个vi或者缺少sndvib.dll 库,但是不管我把sndvib.dll 放在那里都还是同样的异常,我试过导出其他不引用附加工具包的vi成dll就不存在这个问题,请问做过这方面开发的朋友指点迷津,谢谢!
-------------------------------
调试跟踪:
“InteropAssembly.LvClient”的类型初始值设定项引发异常。
在 InteropAssembly.LabVIEWExports.timebase___45orbit(DoubleWaveform analog__32tacho__32signal, DoubleWaveform[] waveform__32in, 通道选择[] 通道信息, UInt16 slope__32__40Rising__41, Orbit__32plot__322[,]& timebase__32plot, Orbit__32plot__322[,]& orbit__32plot, Speed__32profile& speed__32profile)
在 LabView_UnitTestProject.UnitTest1.TestMethod1() 位置 C:UsersMarssourcereposLabView_UnitTestProjectLabView_UnitTestProjectUnitTest1.cs:行号 37
InteropAssembly
System.Collections.ListDictionaryInternal
System.IO.FileNotFoundException: Missing Dependency in: Sub VItimebase-orbit.vi: 库未找到或无法加载: sndvib.dll ---> NationalInstruments.LabVIEW.Interop.VIAssemblyException: Missing Dependency in: Sub VItimebase-orbit.vi: 库未找到或无法加载: sndvib.dll
在 NationalInstruments.LabVIEW.Interop.LVRuntime.throwMissingDependencyException()
在 NationalInstruments.LabVIEW.Interop.LVRuntime.LVClientInit(ClientKind clientKind, IntPtr initRec)
在 NationalInstruments.LabVIEW.Interop.LVRuntime..ctor(String[] entryPointNames, String lvClientAssemblyPath, String lvRuntimeVersion, Boolean enableLoadLatestCompatibleRTE)
在 InteropAssembly.LvClient..cctor()