Debugging a COM Interop Class Library

G

Guest

I have a very simple Visual Basic .NET 2003 class library project
ClassLibrary1 configured to run an external program (in this case
C:\WINDOWS\system32\wscript.exe), in the Debugging Configuration Properties
Dialog Box with command line arguments C:\test.vbs. When I run the project, I
get an "unable to start debugging" error "unable to start program
'C:\WINDOWS\system32\wscript.exe'".

Why do I get this error and how can I solve it?

The Class Library is very simple

Public Class Class1
Public Sub Test()
Stop
MsgBox("Test")
End Sub
End Class

C:\test.vbs contains (if that matters):

msgbox "Here"
Set objApplication = Wscript.CreateObject("ClassLibrary1.Class1")
objApplication.Test

I selected the Build Configuration Properties Register for COM Interop
checkbox, because wscript.exe is unmanaged code.

I am running Windows XP Professional Service Pack 2.
 
C

Cor Ligthert [MVP]

Greg,

Maybe you can add the process in the debugger. Be aware that it than has to
run before you can attach it. Be as well aware that there probably is no
source code availalable, so you only see the calls.

Cor
 
G

Guest

I have no idea what you just said.

Cor Ligthert said:
Greg,

Maybe you can add the process in the debugger. Be aware that it than has to
run before you can attach it. Be as well aware that there probably is no
source code availalable, so you only see the calls.

Cor
 
G

Guest

No, I'm not debugging a process. I'm debugging a Class Libbrary. A Windows
Script application just happens to create the class library object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top