Is Vault affecting my VB6-to-C# COM interop?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
bobogs
Posts: 7
Joined: Thu Aug 25, 2005 6:50 am

Is Vault affecting my VB6-to-C# COM interop?

Post by bobogs » Fri Feb 06, 2009 10:40 pm

Been using Vault 3.1.7 for years...it's worked very well for us (and an upgrade just isn't in the budget). All of a sudden, my VB6 apps on my dev machine are getting "file or dependency not found" when creating late-bound C# 2.0 objects that have been exposed via COM interop.

While troubleshooting this error, I did the createobject() call in a new, simple VB6 project, and it worked. As I tried to look for differences between this new VB6 project and my other VB6 projects that fail, because it must be some kind of configuration issue, I realized that the old projects are all bound to Vault and the new project is not (it's just a temporary project).

1. I ran one old project and canceled out of the Vault login dialog, but the createobject failed again.

2. I deleted the read-only scc files in the project's folder, reopened the project, answered No to add to Vault...the createobject worked just fine!!!

3. I closed and reopened the same project, relinked it with its Vault project...the createobject failed.

4. Redid #2 above...the createobject worked.

What could the Vault bindings be doing to affect COM interop?

Thanks for your help.
Gary

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Is Vault affecting my VB6-to-C# COM interop?

Post by Beth » Mon Feb 09, 2009 9:32 am

Are you seeing something similar to what is described in this thread?
Vb6 / Dot Net 2.0 Interop

If not, then I think some logging should help identify what is going on. Client-side logging for your IDE integration is described here: Client Side Logging. You will only need the IDE integration logging with the version of VS you are using. Once that is started, recreate the scenario and see what the log says. If possible, attach the log here (you can remove it when the troubleshooting is finished), or email it to support at sourcegear.com (attn: Beth) with a link to this forum thread.
Beth Kieler
SourceGear Technical Support

bobogs
Posts: 7
Joined: Thu Aug 25, 2005 6:50 am

Re: Is Vault affecting my VB6-to-C# COM interop?

Post by bobogs » Mon Feb 09, 2009 2:42 pm

Thanks for your help, Beth. Turns out my VB6 vault connection and my standard GUI vault connection were indeed loading under the 1.1 framework. I was able to get it working after adding the startup/requiredruntime section/key to my existing vb6.exe.config in the VB98 folder (I updated the vaultguiclient.exe.config also...why not force that one to use 2.0 also). I still have no idea how this has been working well up until a few days ago and just stopped working.

In case this helps someone else...after getting past the "assembly/dependencies not found" error with this fix, I started getting an "automation error" instead. Nothing had changed in the C# classes, so I figured it must be another config issue. I fixed that by moving the <startup> section to the bottom of my config file(s)...something didn't like it when that section was at the very top (inside the root <configuration> section, of course).

Thanks again.

Gary

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Is Vault affecting my VB6-to-C# COM interop?

Post by Beth » Mon Feb 09, 2009 2:49 pm

Thanks for the update and the additional information.
Beth Kieler
SourceGear Technical Support

Post Reply