10-22-2013 12:37 AM
Method not found: 'Void National Instruments.LabVIEW.Interop.LV Runtime.throw MissingDependencyException()'.
My colleague created a Labview DLL for me to use in .NET.
I have tried getting this DLL to work in 3.5 framework however it only worked on framework 2.0.
I recently tried again and now it will not work in framework 2.0 or any available frameworks.
He is using Labview 2011.
I am a little baffled as to how the application just stopped working. The National Instruments Runtime I am using is Labview 2011, version 1.1.0.0. The labview dll he gave me is using 1.1.0.0 as well. I have tried using 1.0.0.0 and I get an error saying there is a mismatch.
In addition, for some reason I was never successful in making this work in 3.5, and now I can't make it work in 2.0 either.
Any help is greatly appreciated. I have tried re-installing the runtime engine, tried different versions like labview 2013 but no luck...
Everything works except when I call the dll procedure:
LabVIEWExports.AxBClusterArrays(out ERR, out OUTDLL, INDLL);
----------------
My Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using NationalInstruments.LabVIEW.Interop;
using InteropAssembly;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
InteropAssembly.LVCluster_1 OUTDLL = new InteropAssembly.LVCluster_1();
InteropAssembly.LVCluster_2 INDLL = new InteropAssembly.LVCluster_2();
double[] TestA = new double[1];
double[] TestB = new double[1];
for (int runs = 0; runs < 1; runs++)
{
TestA[runs] = 1;
TestB[runs] = 1;
}
INDLL.A = TestA;
INDLL.B = TestB;
NationalInstruments.LabVIEW.Interop.ErrorCluster ERR = new NationalInstruments.LabVIEW.Interop.ErrorCluster();
MessageBox.Show(NationalInstruments.LabVIEW.Interop.FrameworkVersion.Fx35.ToString());
try
{
//LabVIEWExports LVE = new LabVIEWExports()
LabVIEWExports.AxBClusterArrays(out ERR, out OUTDLL, INDLL);
}
catch (Exception f)
{
MessageBox.Show(f.Message.ToString());
}
}
}
}
10-22-2013 12:53 PM
Figured it out, I thought we where using Labview 2011, however it was Labview 2011 SP1.
Thus i had to install the runtime envioment 2011 SP1.
Regards,
ADL