Platform-Specific Assemblies in 32-bit TestStand and 64-bit TestStand

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Complete the following steps to migrate platform-specific .NET assemblies, such as C++/CLI assemblies that contain unmanaged code, when you no longer intend to support the 32-bit architecture.

  1. Replace existing 32-bit .NET code modules with 64-bit versions in-place.
  2. Move the assemblies located in the <TestStand Public> or other non-shared search directory to the equivalent 64-bit location.

If the 64-bit version of the interface remains unchanged, TestStand sequences that depend on the code modules execute in 64-bit TestStand but no longer execute in 32-bit TestStand.

If you need to simultaneously support both architectures with a .NET code module but cannot use an AnyCPU assembly, create a 32-bit version of the assembly and a 64-bit version of the assembly and use one of the following techniques to associate the assembly with the adapter:

  • Register the assembly in the GAC. If you register versions of an assembly in the GAC that support the x86 (32-bit) architecture and the x64 (64-bit) architecture, the .NET Runtime Engine automatically loads the correct version of the assembly.
  • Use the $(Platform) path macro. Although the default 32-bit subdirectory for .NET projects is x86 in Microsoft Visual Studio, TestStand expands $(Platform) to win32 for the .NET Adapter just as it does for the C/C++ DLL and LabWindows/CVI Adapters.
  • Use non-shared TestStand search directories.
  • Write bitness-conditional code when the 32-bit version and the 64-bit version of a .NET code module use different interfaces.

As an alternative to providing versions of a platform-specific .NET assembly for both platforms, you can call a non-matching bitness of a platform-specific assembly out-of-process using .NET remoting. Visit ni.com/info and enter the Info Code ex4g4q to access the National Instruments support article 5TUCSLXU, Can TestStand Call 64-Bit Code Modules?, for more information about this technique.

WAS THIS ARTICLE HELPFUL?

Not Helpful