LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 8.5 and .net invalid constructors

I am trying to build some labview (v8.5) code that uses .net  but one particular set of constructors appear invalid in labview.  I tried starting from scratch with a project and tried putting the dll file in the same directory as the vi and project file but still no luck.  When I open it in labview I see the first level of items but the constructors do not show up in the lower section of the .net constructor dialog box.
 
I installed version 8.2 as a 30 day trial and all works fine.   Is it possible to use this .net code with version 8.5?
 
I read the comments about this issue and tried the following with no change in the outcome:
Create an empty project in the same directory as the dll file containing the constructors.  Add a blank VI to that directory.  Tried to select constructor but all constructors are invalid.   I tried the same in version 8.2 but when the project is opened in version 8.5 the constructors are invalid.
 
0 Kudos
Message 1 of 5
(3,335 Views)
Some more information that may change things:
I hadn't tried to run the code before but now that I have tried, it does not work even on labview 8.2.  I get a .net exception when the first constructor is called.  (error 1172)
We have looked over the assemblies and can't find anything wrong with them and they work just fine with other development environments. 
 
 
0 Kudos
Message 2 of 5
(3,314 Views)
Does you .NET assembly depend on other private assemblies? If so, you should place them in the same folder as your .NET assembly.
0 Kudos
Message 3 of 5
(3,312 Views)
Yes it does depend on a number of assemblies.  I copied all the dll files into the same directory as the project file and the vi and was able to run a simple test program. 
I will need to test thoroughly to determine if the altered dll locations will cause any issues however.  
Is there any way to modify the path list that Labview uses to find assemblies?   Only Labview has this problem.  No issues with C#, or VB for example.
0 Kudos
Message 4 of 5
(3,306 Views)
This isn't specific to LabVIEW. It has to do with the way the .NET runtime finds private assemblies. You can take a look at the article How LabVIEW Locates .NET Assemblies for more information. You can modify the .config file to specify to the .NET runtime where to look for assemblies. When working in the development environment you would modify LabVIEW.exe.config. For a built application you'd modify your app's .config file.


Message Edited by smercurio_fc on 07-24-2008 03:33 PM
0 Kudos
Message 5 of 5
(3,296 Views)