LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll / GAC issues

Hi All,

 

I REALLY hope someone in the community can help me out here. I'll give as many of the parameters of the situation as I know below so pardon if it seems disjointed.

 

We have an in house built .NET dll that contains all of our instrument drivers.  The dll is a merged dll. When I use the dll from a specific folder location without the dll being "installed" in windows (Windows 7 machines) everything works as it should. I can see the constructors, I can access all of the methods, and my VIs / program runs perfectly. Another note about the complete system. We are running a custom UI, using TestStand 2013 as the engine, and then my VIs are called from the sequences.  At this  point each instrument is in its own project in LabVIEW(2014) then all are tied together in one main project. My next step after I get the dll issue resolved is to put it all into a packed project library that the sequence file(s) can access from one place and allow proper deployment of the system to our customer.

 

The problem is that when I "install" the dll, and the dll is now in the "GAC" EVERY VI that has an instrument call breaks.  I get the message (paraphrasing here), "the testset.dll expected at ... was loaded from C:\Windows\Microsoft.NET\assembly\GAC_32\TestSet.RCTS\v4.0_8.0.0.26075__cf29a0f483c75c4a" which is correct for the version I want, but as stated, opening the VIs shows them as broken.

 

OR is this expected behavior and once I get everything into a packed project library, everything will run fine?  I just need to do any development work on a machine that does not have the dll in the Windows GAC?

 

I AM using the following config file within the main project and each instrument project. It is named for the project where it is being used at. i.e. for the CSDB driver, "CSDB.lvproj.config" and the text in the file is:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="C:\TestApps\Released\TestSet.RCTS(008)"/>
<dependentAssembly>
<assemblyIdentity name="TestSet.RCTS"
publicKeyToken="cf29a0f483c75c4a"
culture="Neutral" />
<bindingRedirect oldVersion="0.0.0.0" newVersion="8.0.0.26075" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

 

(following proper indentation that does not show up here.  I will attach the actual file also)

 

Any hints at all would be greatly appreciated!!

 

Best Regards,

M3rl3n (Dan)

 

 

 

0 Kudos
Message 1 of 4
(1,641 Views)

Well, I think I solved it. I only tested it on one VI so far, but what I found in that one is; Dynamic Dispatch Terminals.  I guess they cannot be used for instrument calls when the dll is in the GAC.

 

I will "fix" all of the remaining in the CSDB driver and report back.

 

YEAH!!!

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

Ok. Kinda a new question.

 

Once I had the CSDB project updated, save, closed, then reopened, I got this:

C:\rw_apps\Nav4000\Source\Sequence File Modules\RCTS_Instrument\CSDB\Private\CSDB.lvclass\CSDB.ctl (CSDB.lvclass:CSDB.ctl)
- Expected Assembly "TestSet.RCTS, Version=7.0.13.1819, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a", but found "TestSet.RCTS, Version=8.0.0.26075, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a."
- Expected Assembly "TestSet.RCTS, Version=8.0.0.26075, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a", but found "TestSet.RCTS, Version=7.0.13.1819, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a."
C:\rw_apps\Nav4000\Source\Sequence File Modules\RCTS_Instrument\CSDB\Private\CSDB_Init.vi (CSDB.lvclass:CSDB_Init.vi)
- Expected Assembly "TestSet.RCTS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a", but found "TestSet.RCTS, Version=8.0.0.26075, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a."
- Expected Assembly "TestSet.RCTS, Version=8.0.0.26075, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a", but found "TestSet.RCTS, Version=7.0.13.1819, Culture=neutral, PublicKeyToken=cf29a0f483c75c4a."

 

Why would it have the 2nd find back to the original version 7?  I WANT it to only use version 8!

 

 

 

0 Kudos
Message 3 of 4
(1,617 Views)

One more bit to the puzzle.

To build the config file, there is a little bit more info here:

"Refers to the version of the assembly that LabVIEW is currently using in the form n.n.n.n. To prevent LabVIEW from using multiple different versions of the assembly, specify a range of versions here using the form n.n.n.n - n.n.n.n."

 

When I specify the range to be, oldVersion="0.0.0.0-7.0.13.1819" everything seems a little happier.  I'm not sure now if the dynamic dispatch terminals were playing a part in this not working, so I will test in a little while and let you all know.

 

I know I've basically answered my own questions here, but if this will prevent someone else from getting stuck in this, it's worth it.

0 Kudos
Message 4 of 4
(1,602 Views)