From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Error 2 occurred" sn, gacutil

I am using LabVIEW 2011 on Windows 7, 64 bit. I am building a dll. When the build completes, I'm asked if I want to sign it and if I want to install it in the GAC. I want to do both of these. In both cases (when attempted individually), I get an Error 2 occurred message. I find that when I skip both steps and get to the Done screen of the build, the dll is created and I can manually sign and install it. That is, the tools exist, are in the path, and function as expected. However, if I look at the target directory after the popup for signing is up, the dll does not yet exist in the directory. Similarly, the dll is not in the directory if I skip signing and get the gacutil popup.

The same build specification works for someone else working on the project. That is, they can sign and install into the GAC from the LabVIEW build. I'm guessing there is a preference that is allowing their dll file to get written to the directory before the signing popup appears.

Can anyone give me suggestions to get this to work in the LV build?

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

Hi Flamingo2,

 

Would it be possible for you to post the text or a screen shot of the error message you are seeing and the pop-up window that precedes the error?

Jayme W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,304 Views)

I can't right now because the entire project will not build. However, the error information was not particularly helpful It was the basic "Memory full" Error 2. However, when I tried to run sn and gacutil from a separate VS command window, both said that the file was not found. Sure enough, the dll file was not there. To force it to appear, I had to skip both the sn and gacutil commands (which then resulted in a successful build and the creation of the dll).

 

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

The reason I can't build is that LabVIEW thinks the assembly I'm trying to link to has changed and it will not allow me to change it. It says it is expecting 0.0.0.0 and is finding 3.2.0.45. I would like it to link 3.2.0.45, but it says "While loading CSServiceWrapper:3.2.0.45:neutral:f5b02417ed7e848d, LabVIEW report 4 warnings:

- .NET assembly changed (4 warnings)

- Click Show Details for more information.

To view warning details later, select VIEW >> Load and save Warning List.

 

The details are:

 - Expected Assembly "CSServiceWrapper, Version=0.0.0.0, Culture=neutral,

PublicKeyToken=f5b02417ed7e848d", but found "CSServiceWrapper,Version=3.2.0.45, Culture=neutral, PublicKeyToken=f5b02417ed7e848d."

 

The message is repeated.

When I try to select the correct constructor, I get the first message. If I manage to get it to display the assemblies (from which I might select a constructor, the options do not include any constructors (although the 3.2.0.45 assembly appears with its correct elements.)

 

I've tried cleaning the project (in the hopes of getting rid of that "expected 0.0.0.0 assembly, but no such luck.

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