Error When Start Example of Building a Sequence Using API for .NET

Updated May 19, 2023

Reported In

Software

  • TestStand

Programming Language

  • C# .NET

Issue Details

I am learning how to build a sequence file in .NET by studying Building a Sequence Using API example. When I run the example in Visual Studio, I am getting the following error. How should I resolve this error?

A project with an Output Type of Class Library cannot be started
directly.

In order to debug this project, add an executable project to this
solution which references the library project. Set the executable
project as the startup project.


2023-05-19_09h59_55.png

Solution

You should build the provided SequenceFileXMLParser solution located at C:\Users\Public\Documents\National Instruments\<TestStand Version>\Examples\TestStand API\Building a Sequence Using API\DotNet\SequenceFileXMLParser to generate a dynamic link library  (DLL). 
2023-05-19_10h30_12.png
By default, the generated DLL can be found at C:\Users\Public\Documents\National Instruments\<TestStand Version>\Examples\TestStand API\Building a Sequence Using API\DotNet\SequenceFileXMLParser\SequenceFileXMLParser\bin

Additional Information

This is expected behavior. To use this example, you should build the solution instead of starting it. This is due to the purpose of the project is to build a DLL and be called in the sequence file.