Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated

Archived: Why Can't I Debug TestStand 2012 .NET Code Modules in Microsoft Visual Studio 2008 or Earlier?

This document has been archived and is no longer updated by National Instruments



Primary Software: TestStand
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I would like to debug .NET code modules that I’m calling from TestStand 2012. However, I notice that in the .NET Adapter Configuration dialog, I cannot select Visual Studio 2008 or earlier to use for debugging.

 

In addition, when I attempt to use the Debug»Attach to Process option in Visual Studio 2008 or earlier to attach to the TestStand process, debugging features do not function. If I select Managed for the Attach To field in the Attach to Process dialog, I receive the following error:

Unable to attach to the process. Check for one of the following.

1. The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
2. The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
3. The Microsoft .NET Framework version specified by you for debugging is incorrect.

Please see the Visual Studio .NET debugger documentation for correctly specifying the Microsoft .NET Framework version your application is going to use for debugging.



Can I debug .NET code modules called from TestStand 2012 using Visual Studio 2008 or earlier?

Solution:
Debugging .NET code modules called from TestStand 2012 and newer versions is not supported in Microsoft Visual Studio 2008 or earlier. To debug .NET code modules called from TestStand 2012, you must either use Microsoft Visual Studio 2010 or an open source development environment with support for .NET 4.0, such as SharpDevelop.

As of version 2012, TestStand targets the .NET Framework 4.0. Thus, all TestStand processes load the .NET 4.0 Common Language Runtime (CLR) and execute .NET assemblies using the .NET 4.0 CLR. Visual Studio 2008 and earlier cannot debug managed code running in the .NET 4.0 CLR, and therefore cannot be used to debug .NET code modules called from TestStand 2012 and newer versions.

TestStand 2012 targets the .NET Framework 4.0 for a number of reasons, including:

 

  • Improved performance due to optimizations of the framework
  • Improved support from Microsoft

Note: TestStand 2012 does support the execution of .NET code modules developed in VB.NET or C# and built with Visual Studio 2005 or 2008. However, to execute assemblies developed in C++/CLI, you must create a configuration file, as described in the .NET Support Enhancements section of the TestStand 2012 New Features help topic. Visual Studio 2005 or 2008 can still be used to debug native (unmanaged) code modules in TestStand 2012 and later.



Related Links:
SharpDevelop Home
KnowledgeBase KB 595FQJPI: Can I Use Visual Studio 2010 with TestStand and Call .NET Framework 4.0 Code Modules?

Attachments:





Report Date: 04/02/2012
Last Updated: 11/19/2013
Document ID: 5W1FPUUB

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit