LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV2009 .net runtime issue

Hi,

 

I have a VI in LabVIEW 2010 using .net constructor and methods and working just fine.

 

My problem is that it is not working with LabVIEW 2009, on the same machine using the same dll.

It is saying: "The version of the assembly you requested was automatically promoted to a later version by the .NET runtime engine".

 

How can I make it work in 2009?

 

Thanks, Amir.

0 Kudos
Message 1 of 4
(2,819 Views)

Amir,

 

We've seen a couple of other instances like this.  Try the workaround mentioned in the link below:

 

labview, .net assembly promoted to later version

http://www.mofeel.net/394-comp-lang-labview/7580.aspx

 

-"

OK! I think i found the problem and a workaround.
 
As it seems, when i replace the current .net constructor with an empty one, the assembly version will be still saved in the source code of the vi.
The only way to replace it, is to delete the constructor, save the vi, then place a new constructor and select the assembly again.
As i have a lot of constructors in place, it's a lot of work but it seems to work fine then.

"

 

As well, the link below provides more info on how LabVIEW references .NET assemblies.

 

How LabVIEW Locates .NET Assemblies
http://digital.ni.com/public.nsf/allkb/C4EA5ABBEB67AF7C862573F3004D4421?OpenDocument

 

Best,

Chris LS

National Instruments
Applications Engineer

Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 2 of 4
(2,777 Views)

Thank you Chris,

 

Some more inputs here:

 

Now I've experience the same behavior both in LV2009 and LV2010.

I have several versions a .net Dll file. All file versions has the same name, and were compiled in the same machine, using the same .net version.

 

After successfully connecting one Dll, I can not connect to any other Dll file, with the same name, without restarting LabVIEW (closing the VI, Project, and LabVIEW software). After restarting, and creating a new VI, everything is working with the other Dll (that is why I thought using LV2010 solved my problem, it just opened a new LabVIEW instance).

 

Both operations are necessary, 1. Restarting LabVIEW and 2. Creating a new VI.

 

When I tried to ignore the error, connect to some other Dll and create a new object, it seems LabVIEW remembered old methods and properties that were not supposed to exist in the chosen Dll.

 

My conclusions are:

1. LabVIEW somehow remembers some data about the current Dll, which is preventing it from connecting to another Dll with the same name.

2. The error reported ("The version of the assembly..." -see above post) is not accurate.

 

Can you report this upstream? Maybe they can get this fixed?

 

0 Kudos
Message 3 of 4
(2,728 Views)

Hi Amir_Y,

 

I will go ahead and do the proper escalation for this issue, and I will post any updated that I will get.

 

Thanks and have a great day.

0 Kudos
Message 4 of 4
(2,696 Views)