NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand ActiveX control compile warnings in WPF 2012

Solved!
Go to solution

hello everyone,

 

I am using TestStand ActiveX controls(ApplicationMgr, SequenceMgr, ExcutionMgr) in my project written in WPF 2012.

After I put the controls on the form, there are some referrences automatically included in my project. But when I compile, I got the following warnings in the output window:

 

CSC : warning CS1762: A reference was created to embedded interop assembly 'c:\Windows\assembly\GAC_MSIL\NationalInstruments.TestStand.Interop.UI\5.1.0.226__ad9244eb3b825cd8\NationalInstruments.TestStand.Interop.UI.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files (x86)\National Instruments\TestStand 2013\API\DotNet\Assemblies\CurrentVersion\NationalInstruments.TestStand.Interop.UI.AxControls.dll'. Consider changing the 'Embed Interop Types' property on either assembly.
CSC : warning CS1762: A reference was created to embedded interop assembly 'c:\Windows\assembly\GAC_MSIL\NationalInstruments.TestStand.Interop.UI.Support\5.1.0.226__ad9244eb3b825cd8\NationalInstruments.TestStand.Interop.UI.Support.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files (x86)\National Instruments\TestStand 2013\API\DotNet\Assemblies\CurrentVersion\NationalInstruments.TestStand.Interop.UI.AxControls.dll'. Consider changing the 'Embed Interop Types' property on either assembly.
CSC : warning CS1762: A reference was created to embedded interop assembly 'c:\Windows\assembly\GAC_MSIL\NationalInstruments.TestStand.Interop.API\5.1.0.226__ad9244eb3b825cd8\NationalInstruments.TestStand.Interop.API.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files (x86)\National Instruments\TestStand 2013\API\DotNet\Assemblies\CurrentVersion\NationalInstruments.TestStand.Interop.UI.AxControls.dll'. Consider changing the 'Embed Interop Types' property on either assembly.
CSC : warning CS1762: A reference was created to embedded interop assembly 'c:\Windows\assembly\GAC\stdole\7.0.3300.0__b03f5f7f11d50a3a\stdole.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files (x86)\National Instruments\TestStand 2013\API\DotNet\Assemblies\CurrentVersion\NationalInstruments.TestStand.Interop.UI.AxControls.dll'. Consider changing the 'Embed Interop Types' property on either assembly.

 

When I change the "Embed Interop Types" property, I got errors instead. Can someone give some advise? What does the warning message mean? How should I get rid of the warnings or should I just ignore them?

 

thanks a lot!

 

Regards,

 

 

0 Kudos
Message 1 of 5
(4,684 Views)

Embed interop types should always be set to false for teststand interop assemblies. TestStand interop assemblies are installed to the GAC so can be accessed from any location and thus do not need to be embeded or copied locally. Embedded interops do not support enum types which TestStand uses.

 

How exactly did you add the reference to the teststand controls? What errors do you get when you set embed to false?

 

-Doug

0 Kudos
Message 2 of 5
(4,638 Views)

Hello Doug,

 

The referrence are added automatically when I put the ActiveX control on the form.

Embed interop types are by default false. The error came out when I change them to true. (Now I know I should not do that.)

 

Could not figure out why there are warnings when the types are set to false.

 

 

Regards,

 

 

0 Kudos
Message 3 of 5
(4,620 Views)
Solution
Accepted by topic author 0049

According to the text in the warnings, it sounds like you still had embed set to true on some of the assemblies.

Try changing all the ones in the warnings to not embed and then the warnings will probably go away.

-Doug

Message 4 of 5
(4,611 Views)

Hello Doug,

 

I have found the error.

The embed interop types of "stdole.dll" is still true, which causes the warnings.

Thanks for your help.

 

Regards,

 

0 Kudos
Message 5 of 5
(4,546 Views)