Vault API throws error when debugging COM Wrapper from VB6

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
dking513
Posts: 48
Joined: Tue Apr 20, 2004 3:23 pm

Vault API throws error when debugging COM Wrapper from VB6

Post by dking513 » Tue Aug 17, 2004 10:20 pm

Here's my setup:

1. I have written a .net dll that uses the vault api.
2. I have registered this for COM interop, so I have a type library I can use from VB6.
3. I have a VB6 exe that uses this .net assembly through it's COM interface.

Here's the problem:
1. If I compile my VB6 code, everything compiles fine, and the EXE runs fine. All communication with vault works fine - gets, checkouts, etc...
2. If I run my VB6 code from the debugger, then I get an error when trying to set the vault repository (I am able to instantiate the object, initialize the vault object and login, but not set the repository) :

"The working folder state information for C:\Program Files\TestFolder incompatible with this version of Vault. Please choose a different working folder path. The specific compatibility exception was: Cannot find the assembly VaultClientOperationsLib, Version=2.0.3.2174, Culture=neutral, PublicKeyToken=null."

Any ideas?
I have seen a similar issue discussed in the forums where the same error message was a result of not having the .net assemblies in the same folder as the application. I have copies of the .net dlls in my app folder, and everything works fine when I am running the compiled exe. Why would it throw this error when using the VB6 debugger?

Thanks,
Dave

dking513
Posts: 48
Joined: Tue Apr 20, 2004 3:23 pm

I have a workaround.

Post by dking513 » Tue Aug 17, 2004 10:33 pm

Well, I guess writing out the forum post made me think about it enough to try a work around that seems to fix the problem.

Copying the .net assemblies to the same folder as the VB6 IDE exe (C:\Program Files\Microsoft Visual Studio\VB98) got things working.

Does anyone understand how .net chooses to look for it's assemblies? Isn't there some way to specify a search path? In order for COM interop to work, the .net assembly get registered in the GAC, so why the heck can't my computer figure out where the assembly files are?

Locked