07-13-2018 05:30 AM
Hi All,
I am trying to create a .NET DLL to use in TestStand 4.1.1
Starting from a Class.cs file I found in the TestStand examples:
using System; using System.Collections.Generic; using System.Text; using NationalInstruments.TestStand.Interop.API; // TestStand Core API. Add <TestStand>\API\DotNet\Assemblies\CurrentVersion\NationalInstruments.TestStand.Interop.API.dll to your project as a reference. using System.Runtime.InteropServices; namespace ClassLibrary { public class Class { public double CalculateAreaOfCircle(double radius) { return System.Math.PI * System.Math.Pow(radius, 2); } } }
After running the command
csc /r:"C:\Program Files (x86)\National Instruments\TestStand 4.1.1\API\DotNet\Assemblies\CurrentVersion\NationalInstruments.TestStand.Interop.API.dll" -target:library Class.cs
I get a DLL file called Class.dll.
When I select this Dll in a TestStand action, there are no classes listed under the classes combobox. I allready provided an object reference variable.
What is going wrong?
Solved! Go to Solution.
07-16-2018 03:27 AM
In the meantime I found the problem: I was compiling my DLL to .NET Framework version 4.0, using "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\csc.exe" made my DLL compile to v2.0 and now TestStand 4.1.1 can browse its contents.