NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

cant select class from .NET DLL

Solved!
Go to solution

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?

0 Kudos
Message 1 of 2
(2,263 Views)
Solution
Accepted by topic author svh

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.

0 Kudos
Message 2 of 2
(2,242 Views)