NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

error message when adding .NET action steps

Whenever I add a .NET action step and try to edit it, the following error message is displayed:
 
"Error while accessing the .NET assembly.
 
Could not load file or assembly 'mscorcfg, Version=2.0.0.0, Culture=neutral, ........  The system cannot find the file specified."
 
Any ideas what is causing this?
 
 
 
 
 
0 Kudos
Message 1 of 22
(7,549 Views)
Hey Jason,

It sounds like you may not have the mscorcfg assembly loaded into your Global Assembly Cache(GAC).  There should be a mscorcfg.dll file in C:\WINDOWS\assembly.  I was also curious as to which versions of the .NET framework you have installed, what versions of Visual Studio are installed on this machine, and what version of TestStand you are using.
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 2 of 22
(7,528 Views)

Pat P,

Thanks for the feedback.  I'm using VS.NET 2003, .net FW 1.1, TestStand 3.5. 

 

Jason

 

0 Kudos
Message 3 of 22
(7,527 Views)
Jason,
 
You have probably figured this out by now, but for other readers of this thread, the assembly, mscorcfg, is installed with the .NET Framework SDK. That is, in addition to installing the .NET Framework Redistributables, you will want to install the .NET Framework Software Development Kit (SDK). You can get the SDK from the MSDN Download and Code Center.
 
Regards,
 
Eric
0 Kudos
Message 4 of 22
(7,408 Views)
Jason -
 
You state that you are using .NET Framework 1.1. However, the error you posted indicates that the assembly you are trying to load references version 2.0 of mscorcfg. I believe that this indicates that the assembly you are trying to load required .NET Framework 2.0.
 
0 Kudos
Message 5 of 22
(7,403 Views)

David makes a good point. Be aware that even if you are using version 2.0 of the .NET Framework, mscorcfg gets installed with the SDK.

- Eric

0 Kudos
Message 6 of 22
(7,395 Views)

Well thanks to those above for providing this information.  I've been puzzling over this for two days, and have even blanked the HD and reinstalled Windows.

I'll add the full error message so that hopefully more people will find this with a search (I didn't find this thread yesterday):

Error while accessing the .NET assembly.

Could not load file or assembly 'mscorcfg, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.  The system cannot find the file specified.

I'm in a position where I am a TestStand developer, but not a .net developer - I'm given .net DLLs by other people here.  I now know I need the .net SDK as a TestStand developer.  Do I need to install this SDK on deployment systems, or is it required only for TestStand development?

I would suggest that NI need to include this SDK in their TestStand development system installer if it's a prerequisite, or at least point the user to it.

0 Kudos
Message 7 of 22
(7,179 Views)
You shouldn't need the .NET SDK (Software Development Kit). You should need only the .NET Runtime. You will need it on your deployed system if you deploy code modules that require it. You can download it directly from Microsoft (link).
 
There definitely are two sides to the argument as to whether TestStand should include the .NET Runtime in its distribution. On one hand, anyone who uses the .NET adapter will need either the .NET Framework Runtime version 1.1 or 2.0. On the other hand, the .NET Runtime is not a prerequisite for the TestStand Sequence Editor, Engine, or LabVIEW, MFC, or C Operator interfaces; the .NET Runtime is somewhat large, we didn't think it made sense to deploy it by default, when there are many systems that don't need it (systems that use CVI or LabVIEW for code modules); and, when we originally developed .NET support, 2.0 hadn't been released yet and Microsoft did not allow redeployment of .NET Framework 1.1 (they wanted everyone to install it by downloading it directly from Microsoft).
 
Now this is all true for TestStand 3.5 (and earlier) and is subject to change in a future version.
0 Kudos
Message 8 of 22
(7,170 Views)
Thanks for the info.  Now I'm confused!  I'm currently downloading all 354MB of the .net SDK, so I'm still waiting to try it.  This is my understanding of the situation:
 
TestStand deployment or development system, no .net steps:           No SDK or framework required.
TestStand deployment, with .net steps:                                               Framework required, SDK not needed.
TestStand development system, with .net steps:                              Framework and SDK required.
 
Is this correct?
0 Kudos
Message 9 of 22
(7,166 Views)

...and a further question:

If I make a sequence that calls .net steps and give this sequence to other developers, what pre-requisites are there for running my sequence on another devlopment system?  In this case, the sequence needs to be executed, but the .net steps do not need to be edited.

The chain here is that some others produce .net DLLs.  I integrate these into TestStand.  I pass my sequences to others, who use TestStand and LabVIEW.  These people need to be able to execute my sequences (under the development system) that call the .net DLLs.

Message Edited by Sean on 11-08-2006 02:41 PM

0 Kudos
Message 10 of 22
(7,167 Views)