LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The selected file is not a .Net assembly (1.1 vs. 2.0)

Solved!
Go to solution

 We are working on an OPC Project and have .Net Assemlys in dlls from a vendor. 

 

The vendor provides 3 assembly dlls, (probably with C# background) for .Net 1.1, 2.0 and 3.5.  

My colleague and I are both running LV 8.6.1 on Windows XP.
When I try to browse to a constructor on the .Net 2.0 dll I get an an error "The selected file is not a .NET assembly, type library or automation executable." 
The same with 1.1 works fine.

 More than strange, the same constellation works fine with 2.0 on the PC of my colleague. 
Since this seems to go more in the MS / Win corner ( not mine 😉 I would appreciate some help.

Gabi

7.1 -- 2013
CLA
Message 1 of 4
(7,118 Views)

Hi there

 

"More than strange, the same constellation works fine with 2.0 on the PC of my colleague" 

 

Triple check that this is true. If YES, then there's something wrong with your system.

 

1. Check that .NET Framework 2.0 is installed (..\WINDOWS\Microsoft.NET\Framework\v2.0.50727)

2. In case the .NET dll is a strong name assembly check that it is added to the GAC (global assembly cache) on system 1. Check this by opening \WINDOWS\assembly on system 2 and search for the .NET dll

3. repeat (3) for any .dll called by the vendors assembly dll.

4. Consider to make a clean reinstall of the framework 2.0

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 4
(7,106 Views)

 

Some progress on what is going on:

1. Check that .NET Framework 2.0 is installed (..\WINDOWS\Microsoft.NET\Framework\v2.0.50727)

Yes so

2. In case the .NET dll is a strong name assembly check that it is added to the GAC (global assembly cache) on system 1. Check this by opening \WINDOWS\assembly on system 2 and search for the .NET dll

I used to call it directly by browsing to the dll. When I opened the assembly in WinExplorer I noticed the marking for some to be MSIL. It turned out that I cannot open any MSIL assemblies. They also do not appear in the selection that opens for the constructor in LV. my colleague can do so !

I checked also the mscore.dll in system32, which seem to be identical.

3. repeat (3) for any .dll called by the vendors assembly dll.

Skipped that one.


4. Consider to make a clean reinstall of the framework 2.0

I did that from bottom up. The only difference seems to be that I have MS Visual Studio (2003 and 2005)installed on my PC, while my colleague has not.

I'll keep you updated, but some more hints would be appreciated. 

Gabi

7.1 -- 2013
CLA
0 Kudos
Message 3 of 4
(7,082 Views)
Solution
Accepted by topic author GabbyG

As it turned out it was not a windows(i.e. MS) problem, but some kind of proliferation on the Labview side.
Proliferation of settings I never knew what they where good for or how they came into my Setups. 

The culprit is labview.exe.config, located in all my LV Installations since 8.5 in C:\program files\National Instruments\LabVIEW 8.x. This file is apparently meant to force labview to use a certain .NET framework, in my case 1.1. That explains why I could not access any 2.0 assemblies, they were explicitly ruled out. How that config file (date-stamped 2006-Aug-16) ever entered into my computers and how it proliferated from one to the other and from 8.5 to 8.6 I don't know.

After some long hours of copying from a pure new white installation on a virtual PC and partially overwriting subdirectories after subdirectories of the failing version (without effect)  simply deleting the file was the final solution. Now I can start doing the real work.

Gabi

Message Edited by Gabi Tillmann on 09-09-2009 01:50 PM
7.1 -- 2013
CLA
Message 4 of 4
(7,037 Views)