LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET container remains blank after choosing .NET control

I have created a Windows Form Control Library in Visual Studio .NET 2008 (3.5 SP1) in C#. When I bring my .dll to the LabView machine (8.5.1), and I try to insert the control into a .NET container on the Front Panel of my VI, the container stays in its currently blank state without giving any error. I can add standard .NET controls (from the System) fine. I can also create a simpler Windows Form Control Library .dll and insert that into the .NET containter. I believe the issue is that this assembly depends on other assemblies in the same directory (all copied to LabView machine), but I am only guessing since no error is given. I'm not sure where to go from here. Any help would be appreciated. Are there any rules for managing these dependencies when .NET assemblies in LabView?
0 Kudos
Message 1 of 11
(5,107 Views)

Hi mvinca:

 

Could you elaborate on the differences between the simpler library and the one that you're actually trying to use?  Are there some particular assemblies that you can narrow the problem down to?

 

It sounds like your assemblies are in the correct place but you can take a look at these resources and see if you catch something:

How LabVIEW Locates .NET Assemblies

Using .NET Assemblies with LabVIEW

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 2 of 11
(5,057 Views)
I'm also having trouble inserting my assembly as a control on one PC only. It works fine on 5 or 6 other PCs. .NET runtime is 3.5. I can open the control with the constructor and query or set properties, but I can't insert it into a container. The error is 'Error inserting Active X or .NET control' (or something very similar). How can I find out WHY I get this error, or what the real error message is??
---
Jörg Heßdörfer
Certified LabVIEW Architect, S.E.A. Datentechnik GmbH
0 Kudos
Message 3 of 11
(5,027 Views)

Hi Joergh:

 

Are you also using C# and LabVIEW 8.5?  Are all of the PC's running the same OS?  Are there any other software differences between the computer that's not working and the others?  Lastly, what is the exact error message you are receiving?

 

With some more information I can research the issue and hopefully find the cause of the problem.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 4 of 11
(5,009 Views)

I'm using LV8.6 and 8.5. The failing machine is 8.6. There are no perceived software differences between working and the failing machine. As the failing machine is currently not available for me, I cannt give you the exact error message, but it's just something like 'Error inserting ActiveX or .NET object', without any further explanation.

I'm using C# (.NET 3.5, VS 2008).

---
Jörg Heßdörfer
Certified LabVIEW Architect, S.E.A. Datentechnik GmbH
0 Kudos
Message 5 of 11
(4,998 Views)
I forgot about the OS versions: it's working on machines with Vista Prof. SP1 and XP Prof. SP3. The machine where it fails is on XP SP3.
---
Jörg Heßdörfer
Certified LabVIEW Architect, S.E.A. Datentechnik GmbH
0 Kudos
Message 6 of 11
(4,997 Views)

Alex,

I got around the issue by putting everything in the GAC. To try to do it the right way, I'll have to remove them from the GAC and try the directories you specified. I'll let you know, but it may be on the back burner for a little bit.

 

0 Kudos
Message 7 of 11
(4,987 Views)

Mvinca:

 

Glad to hear you got your application running correctly for now.  Let us know if you run into any issues in the future.

 

Joergh:

 

One thing you can check on the problem machine is the nicont.dll and nicontdt.dll libraries at C:\Program Files\National Instruments\Shared.  Make sure the version of these libraries is at least as new as the libraries on the other computers.  If nothing looks wrong with these files, I would recommend running a repair on LabVIEW.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 8 of 11
(4,947 Views)

Hi ! 

 

I have the same issue. I'm using visual studio .NET 2005 in C# and C++, and LabView 8.5.1. The C# dll used call others dlls and some of them are C++ dll.

On some PCs, I can see the constructors but on others, I cannot.

 

When I'm using LabView 8.6, I can see the constructors of my dll. The execution of the program seems to work but when I shut down the program, there is an error.

 

I'm wondering if I forgot to set up a framework or another thing that make this problem.

 

 

Any help would be appreciated.

0 Kudos
Message 9 of 11
(4,443 Views)

Hi djcoolsteph,

 

Make sure that you've reviewed the following documents to ensure that you're correctly referencing the Assemblies:

 

KB:  How LabVIEW Locates .NET Assemblies

LabVIEW Help:  Using .NET Assemblies with LabVIEW

 

 What is the error you are getting?  Can you attach a screenshot of it?

0 Kudos
Message 10 of 11
(4,415 Views)