LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

an error occurred trying to load the assembly

Hi,

    I am using a .net constructor node and I recieve the following error when i use browse and select a .dll.

 "an error occurred trying to load the assembly"

 

The .dll is in the same folder as the LV project.

The .dll targets .net framework 2.0

 

I can link to/use the .dll from a simple command line project, the .dll make public one simple class and a constructor for its.

 

Is there any way to get more information out of labview as to what the problem is? 

 

 

baldrik.

0 Kudos
Message 1 of 4
(4,700 Views)
0 Kudos
Message 2 of 4
(4,680 Views)

#include "stdafx.h"
using namespace System;

extern "C" {
namespace clrtest {

    public ref class testClass
    {
    public:
         testClass()
         {
         };
         int foo(void)
        {
            return(42);
        };
    };
}
};

 

Compiling the above minimal c++ code  into a clr dll gives the same cryptic

"an error occurred trying to load the assembly" when the .net constructor node tries to load it.

 

I am far from a .net expert or a c++ one for that matter.

Anyone know what is missing from the above code?

 

Ultimatley I want to write a wrapper for cyusb.lib a static (c++) library for the FX2 USB chip from cypress exposing some of its functionality to labview.

 

Cheers

baldrik

0 Kudos
Message 3 of 4
(4,667 Views)

I am having this same problem, except it works for one administrator login, but not another one.

 

LV2012 SP1 on win7

 

thanks,

Paul

0 Kudos
Message 4 of 4
(3,855 Views)