LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

.net framework deployment CVI 8.5 error -6597

Solved!
Go to solution

I've developed a CVI application that utilizes a VB2005 .net dll.  In my development machine, everything works as expected.  However, when I build a distribution (including .net framework support) and install the application on a target machine (XP SP2 running in a VM), I get the following error code: -6597 when I try to run the CDotNetRegisterAssemblyPath function.  The assembly name is the same assembly name in the CVI generated .net wrapper c file and the location was checked twice.  Again, on the target machine everything runs as expected.  Thinking that it might be the registration of the .net dll on the target machine, I've tried regasm.exe and built an installer using VS2005 for .net dll.  Both completed successfully, so I'm leaning towards the install is good.  For an additional layer of security, I've even copied the dll into the working directory of the distributed exe. Moving to ni.com for additional insight, get the following description for my error code recorded above:

 

"Could not load cvidotnet.dll, the LabWindows/CVI .NET Library DLL."

 

Following this path, I did a search for cvidotnet on my development machine and only came up wtih cvidotnetv1.1.4322.dll.  I did a similar search on the target machine and came up with cvidotnet.msm only.  So.... one would think that I simply copy over the dll from development to target machine into c:\windows\system32\ - no luck.  I even tried registring this dll in a leap of faith...  again, no luck. 

 

I'm at a lost.....  BTW, I'm running 2.0 .net framework on both machines and both are installed properly.

 

I feel like I'm missing something obvious, just can't put my finger on it!

 

Thanks in advance.

0 Kudos
Message 1 of 8
(4,863 Views)

Hi simbex,

 

Given that you found the cvidotnet.msm merge module on the target system, I'm going to assume that you selected the .NET Support option under the LabWindows/CVI Run-Time Engine item in the Drivers & Components section of the CVI Edit Installer dialog box. Now, the reason putting the cvidotnetv1.1.4322.dll in the system32 directory had no affect is because system32 is for unmanaged DLLs and not .NET assemblies. Strongly-named assemblies like cvidotnetv1.1.4322.dll are normally stored in the GAC (or along side the calling EXE). It just has to be in a location that the CLR looks in.  So you could technically just drag-and-drop that assembly into the GAC on the target computer. However, can you check the GAC on the target system to see if that assembly is installed?   

 

If you don't see it on target computer in the GAC, can you please run a log on the installer you created and post it so I can look at it? Refer to the Creating an Error Log File for a Software Installation KB for instructions.

Thanks

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 2 of 8
(4,861 Views)

Jonathan,

 

Thanks for the help.  I searched the GAC on the target machine and did not find any references CVIdotnet.   I uninstalled the application and reinstalled the distribution with the /log flag.  The output of the log file is attached.  BTW, I tried to drag and drop the cvidotnetv*.*.dll to the assembly directory and got a "Assembly cvidotnetv1.xxx.dll must be strongly named".  I thought this was odd.......

 

Thanks again,

Jeff

0 Kudos
Message 3 of 8
(4,854 Views)

Hi Jeff,

 

Yeah, for some reason my mind just blanked out when talking about that DLL. I was thinking of our reflector DLL in the GAC. The component you are referring to a mixed-mode DLL which should in the system32 and not on the GAC. So you were correct in trying to place that DLL in the system32. I'm starting to review your log, but I did have one quick question.  Are you actually installing the CVI RTE on this deployment machine? If not, then this could be the culprit as there is a core components that need to be on that end-system.  Are you building a CVI installer and bundling the RTE? If you are not, please try this real quick.


Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 4 of 8
(4,845 Views)

I've been installing RTE on the target environment.  We have another application buiilt in 8.5 as well on this environment and works fine. 

 

Thanks - Jeff

0 Kudos
Message 5 of 8
(4,841 Views)

Hi Jeff,

 

One possible scenario is that you happened to install the RTE before installing .NET Framework 2.0 on that target sytsem. In this scenario, the component that installs that DLL along with a few other files won't be installed because it fails to detect .NET being installed. However, if you do a repairon the RTE, this condition should re-evaluate and if it finds .NET, then it should install these components.

 

Can you please try a repair?

 

Thanks

 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 6 of 8
(4,833 Views)

The repair seemed to solve my problem.  Based on the order of operations, this seems to make sense.  I'll need to make sure .net is installed before the RTE.  Thanks again for your help and insight.

 

Regards,

Jeff

0 Kudos
Message 7 of 8
(4,828 Views)
Solution
Accepted by topic author simbex

Hi Jeff,

 

Glad you are up and running. One suggestion with regards to ensuring .NET is already installed is to use the Minimum .NET Framework Version option in the Advanced tab of the Edit Installer dialog box in CVI. What this will do is add a condition to the installer such that if it doesn't find .NET already installed, it won't run the installer. This way, neither your application nor the RTE will be installed. 

 

Just a thought...

 

Best Regards,

Jonathan N.
National Instruments
Message 8 of 8
(4,801 Views)