LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.Net Error 1172 when EXE built

Solved!
Go to solution

Well I've gotten a headache and my eyes are crossing trying to resolve a problem we are having here with trying to use a .NET assembly from within a LabVIEW 8.6.1 built EXE. The .NET assembly is instantiated, originally in a sub-vi that then passed out the reference, but I've moved it to the highest level vi that is in this program. In either instance it worked when the program was run in the development environment, but when I make it into a EXE I get the following error message (this is when the instantiation is in the highest level vi) when I click on the resulting EXE:

 

Error 1172 occurred at Error creating instance of CI2CCOMMSInterface in assembly Comco.CI2CCOMMSInterface, I2CCOMMSInterface, Version=1.1.3614.19528, Culture=neutral, PublicKeyToken=null, (System.IO.FileNotFoundException: Could not load file or assembly 'ModuleManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
) in Update Board Cal Constants v2.vi

 

I've tried manually moving the dll from the "data" folder in the build directory, to the same directory as the exe, even tried putting it in the directory ..\shared\LabVIEW Run-time\8.6, thinking that the definition of "calling program" might be stricter than "calling exe". To no avail. I haven't been able to talk to the original author of the .NET assembly, not certain what to ask him so I'm open for suggestions.

 

Thanks again,

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 1 of 6
(4,259 Views)

Hi Putnam:

 

Did you include the dll in your project? Also for the build, did you add it to Source Files, Always Included? Does the dll depend on any other files, i.e. a config file?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 6
(4,249 Views)

It was included in build, as well as my copying it manually to the directory where the .exe resides (the build puts it in the ..\data subdirectory)

 

I also have manually put it in the ..\LabVIEW 8.6 directory, next to the LabVIEW.exe, in the ..\Shared\LabVIEW Run-time\8.6 directory where the run-time engine's "stuff" goes, to address the comment in another post that it needed to be near the calling program, as mentioned below. No joy. This is an area in which I am not as knowledgeable as some others, have "played" with .NET very little. I'm going to try to get in touch with the author of the .NET code, but am even a little ignorant of what questions to ask him, or what information sources to point too.

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 6
(4,233 Views)

Putnam:

 

You may want to try downloading and running debugview while executing your application. It may provide more details as to what specifically is creating the error.

 

http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

 

I see your user icon is comprised of just three lower bytes (trilobite). 🙂 Sorry, couldn't resist.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 4 of 6
(4,224 Views)

Thanks AnKid. The three lower bytes is an indirect reference to my exalted age, feeling at the moment "older than dirt", in fact having served on the committee that came up with the name "dirt".

 

I will give that a try, see if its whining will give us a little more info on what it doesn't like. Apparently, from my searching, 1172 isn't too descriptive.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 6
(4,220 Views)
Solution
Accepted by topic author LV_Pro

Ok, it is only my third day on a new job! I downloaded the debugview and it gave me a little more information, but in looking at how it worked, trying to get an understanding of its various messages (Symantec's programmers apparently left the debug message flag to true in this version of anti-virus!) I realized that something AnalogKid... said jiggled some brain-bits (in the lower three bytes!).and that error message was telling me what was wrong. The ModuleManager reference turns out to be to another inhouse produced dll (I was thinking, for some reason, that it was part of the overall .NET environment, when I thought about it!), that wasn't in either the project or in the dependecies. Apparently the "CI2COMM" dll references it, but LabVIEW doesn't know that so I had to add it to the project manually, then direct the build to put it adjacent to the .exe's destination. Seems to work, no errors when the exe launched, will run it against hardware (about 1/2 mile of building away, unless I want to trek through the new snow, then only a 1/4 mile)

 

Thanks for the brain jogging. In much of my work this is the only "peer" encounter that I get. This new job has a bunch of brainiacs and some LabVIEWers (may be brainiacs too) so it is a change.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 6
(4,207 Views)