468,117 Members | 1,493 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,117 developers. It's quick & easy.

"unable to attach to the process" - VS 2003 VB.NET dll and VB6

Hello,

I'm calling a VB.NET 2003 dll that's registered in COM+. I've added a
reference to it in a VB6 DLL that I'm calling from a Classic ASP page.
Previously I was able to attach to my .NET dll and debug it. I haven't
been able to do this in a while and I'm thinking that it must be
because I've installed VS 2005 on my machine subsequently.

So in my C:\Program Files\Microsoft Visual Studio\VB98 directory I
added a file called vb6.exe.config that contains the following:

<configuration>

<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>

</configuration>

I also added an app.config file to my .NET dll's project that looks
like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>

So I'm running my VB6 dll in the IDE and I put a break point on the
line after the CreateObject line in VB6 dll code.

Dim objDotNet As MyDotNetDLL.clsMyDotNetClass
Set objDotNet = CreateObject("MyDotNetDLL.clsMyDotNetClass")
'Put a break point here...

I have my VB.NET dll project open in the IDE and I try to attach to the
process using Tools / Debug Processes.

I pick dllhost that has "Microsoft Active Server pages" beside it with
the Type Script, .NET, T-SQL, Win32. I then pick "Common Language
Runtime" as the program type that I want to debug and I still get the
"Unable to attach to process" message.

Thanks,
Eric

Sep 21 '06 #1
6 6131
Try

<requiredRuntime version="v1.1.4322" />

Regards

Jochen

<er**********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hello,

I'm calling a VB.NET 2003 dll that's registered in COM+. I've added a
reference to it in a VB6 DLL that I'm calling from a Classic ASP page.
Previously I was able to attach to my .NET dll and debug it. I haven't
been able to do this in a while and I'm thinking that it must be
because I've installed VS 2005 on my machine subsequently.

So in my C:\Program Files\Microsoft Visual Studio\VB98 directory I
added a file called vb6.exe.config that contains the following:

<configuration>

<startup>
<supportedRuntime version="v1.1.4322"/>
</startup>

</configuration>

I also added an app.config file to my .NET dll's project that looks
like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>

So I'm running my VB6 dll in the IDE and I put a break point on the
line after the CreateObject line in VB6 dll code.

Dim objDotNet As MyDotNetDLL.clsMyDotNetClass
Set objDotNet = CreateObject("MyDotNetDLL.clsMyDotNetClass")
'Put a break point here...

I have my VB.NET dll project open in the IDE and I try to attach to the
process using Tools / Debug Processes.

I pick dllhost that has "Microsoft Active Server pages" beside it with
the Type Script, .NET, T-SQL, Win32. I then pick "Common Language
Runtime" as the program type that I want to debug and I still get the
"Unable to attach to process" message.

Thanks,
Eric

Sep 21 '06 #2
Dr. Jochen Manns wrote:
Try

<requiredRuntime version="v1.1.4322" />

Regards

Jochen
Would that be instead of the <supportedRuntime version="v1.1.4322"/or
in addition to it.

-Eric

Sep 21 '06 #3
I use it instead but I think both ways should do it.

Regards

Jochen

<er**********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
Dr. Jochen Manns wrote:
>Try

<requiredRuntime version="v1.1.4322" />

Regards

Jochen

Would that be instead of the <supportedRuntime version="v1.1.4322"/or
in addition to it.

-Eric

Sep 22 '06 #4

Dr. Jochen Manns wrote:
I use it instead but I think both ways should do it.

Regards

Jochen

<er**********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
Dr. Jochen Manns wrote:
Try

<requiredRuntime version="v1.1.4322" />

Regards

Jochen
Would that be instead of the <supportedRuntime version="v1.1.4322"/or
in addition to it.

-Eric
So I put a <supportedRuntime version="v1.1.4322"/in my vb6.exe.config
file that's in the C:\Program Files\Microsoft Visual Studio\VB98 and in
the app.config file that's in the same directory as my VB.NET dll
that's registered in COM+. Still no joy. So the VB.NET dll is in the
MyDLL\obj\Debug directory and in that directory I have:

..sbas
App.config
MyDLL.dll
MyDLL.pdb
MyDLL.tlb
temp
TempPE

My app.config file and vb6.exe.config files now look like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<requiredRuntime version="v1.1.4322" />
</startup>
</configuration>
-Eric

Sep 25 '06 #5
Well, you have to create the config file for the process you are goiung to
debug. As far as I understand this is NOT vb6.exe but DLLHOST.exe in the
System32 folder!

Jochen

<er**********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
>
Dr. Jochen Manns wrote:
>I use it instead but I think both ways should do it.

Regards

Jochen

<er**********@gmail.comwrote in message
news:11**********************@d34g2000cwd.googleg roups.com...
Dr. Jochen Manns wrote:
Try

<requiredRuntime version="v1.1.4322" />

Regards

Jochen
Would that be instead of the <supportedRuntime version="v1.1.4322"/or
in addition to it.

-Eric

So I put a <supportedRuntime version="v1.1.4322"/in my vb6.exe.config
file that's in the C:\Program Files\Microsoft Visual Studio\VB98 and in
the app.config file that's in the same directory as my VB.NET dll
that's registered in COM+. Still no joy. So the VB.NET dll is in the
MyDLL\obj\Debug directory and in that directory I have:

.sbas
App.config
MyDLL.dll
MyDLL.pdb
MyDLL.tlb
temp
TempPE

My app.config file and vb6.exe.config files now look like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<requiredRuntime version="v1.1.4322" />
</startup>
</configuration>
-Eric

Sep 26 '06 #6
Hello,

Dr. Jochen Manns wrote:
Well, you have to create the config file for the process you are goiung to
debug. As far as I understand this is NOT vb6.exe but DLLHOST.exe in the
System32 folder!

Jochen
So I now have a dllhost.exe.config file and an app.config file that now
look like:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
<requiredRuntime version="v1.1.4322" />
</startup>
</configuration>

I'm able to step into my .NET DLL. The way it gets called is my .NET
dll is registered in COM+ (creating a tlb file). I'm then running a
classic ASP application that call a vb6 dll (also registered in COM+).
My vb6 dll then calls my .NET dll which calls a web service. I pass
in the url to the web service as a parameter to my .NET dll, I'm
currently passing in a url that points to a test harness web service
that also sits on my local machine. When I call the web service it
runs correctly, but I'm not able to step into the code for my web
service.

The test web service is in a .NET solution together with my .NET dll
that's the link between the web service and my vb6 dll. When I look at
the break points in my web service they all have a "?" beside them
saying the "The breakpoint will not currently hit. No symbols are
loaded for the document." I've done a rebuild all on my solution with
the solution configuration set to "Debug." The datestamp for the pdb
file for the web service matches the .dll.

The web service is in C# while the calling dll is in VB.NET, but these
2 projects are in the same solution.

-Eric

Sep 27 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Eric Brasher | last post: by
1 post views Thread by Shawn Wildermuth | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.