FIX: Unmanaged debugging not possible until you install Visual C++ .NET

Article translations Article translations
Article ID: 813134 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page


You may not be able to debug projects that refer unmanaged DLLs. When you try to debug, you may receive the following error message:
Error while trying to run project. Unable to start debugging.
Unable to start program <name>.
Unmanaged debugging is not available.

Where name is the name of your executable file and the full path of the file.


Microsoft Visual Studio .NET 2002 installs the unmanaged debugger only with Visual C++ .NET.


Use Add Remove Programs to add the Visual C++ .NET feature to the following products.
  • Visual Studio .NET 2002, Professional Edition
  • Visual Studio .NET 2002, Enterprise Architect Edition
  • Visual Studio .NET 2002, Enterprise Developer Edition
  • Visual Studio .NET 2002, Academic Edition


Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.


Steps to Reproduce the Behavior

Install Visual Studio .NET 2002. During the setup process, under Language Tools, click to clear Visual C++ .NET so that Visual C++ .NET is not installed.

Steps to Create an Unmanaged DLL:

  1. In Visual Basic 6.0, create a new ActiveX DLL project. By default, Class1 is created.
  2. Change the name of the Class1 module to MyClass.
  3. On the Project menu, click Project1 Properties.
  4. Name the project MyUnmanagedDll.
  5. Paste the following code in the MyClass module:
    Public Function GetHelloString() as String
        GetHelloString = "Hello from Unmanaged Code"
    End Function
  6. Save the MyUnmanagedDll project.
  7. To create MyUnmanagedDll.Dll, click File, and then click Make MyUnmanagedDll.Dll .

Steps to Refer an Unmanaged DLL from Managed Code:

  1. In Visual Studio .NET 2002, create a new Visual Basic .NET Console Application project, and name the project MySampleApplication.
  2. In Solution Explorer, right-click Reference, and then click Add Reference.
  3. Click the COM tab.
  4. Under Component Name, click to select MyUnmanagedDll, and then click OK.
  5. Paste the following code in Main sub:
    Sub Main()
        Dim myFunction as MyUnmanagedDll.MyClassClass
        myFunction = New MyUnmanagedDll.MyClassClass()
       Console.WriteLine (myFunction.GetHelloString())
    End Sub
  6. Insert a break point on the following line of code:
    Console.WriteLine (myFunction.GetHelloString())
  7. In Solution Explorer, right-click MySampleApplication, and then click Properties.
  8. In the Properties dialog box, click Debugging, and then click to select Unmanaged code debugging.
  9. Press F5 to debug the application. You receive the error message that is described in the "Symptoms" section of this article.


Article ID: 813134 - Last Review: January 17, 2015 - Revision: 4.1
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Academic Edition
  • Microsoft Visual Basic .NET 2002 Standard Edition
  • Microsoft Visual C# .NET 2002 Standard Edition
  • Microsoft Visual J# .NET 2003 Standard Edition
kbnosurvey kbarchive kbvs2002sp1sweep kbbug KB813134

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from