Vault client API error

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

Moderator: SourceGear

Locked
djMax
Posts: 32
Joined: Wed Dec 01, 2004 1:05 pm
Location: Boston, MA

Vault client API error

Post by djMax » Sun Jun 12, 2005 9:22 am

I'm getting this error:

File or assembly name VaultLib, or one of its dependencies, was not found.

at System.Reflection.CustomAttribute.CreateCAObject(Int32& propNum, Assembly& assembly)\r\n at System.Reflection.CustomAttribute.GetObject()\r\n at System.Reflection.CustomAttribute.CheckConsistencyAndCreateArray(CustomAttribute caItem, Type caType)\r\n at System.Reflection.CustomAttribute.GetCustomAttributes(MemberInfo member, Type caType, Boolean inherit)\r\n at System.Reflection.CustomAttribute.GetCustomAttributes(Type type, Type caType, Boolean inherit)\r\n at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)\r\n at System.Xml.Serialization.XmlReflectionImporter.IncludeTypes(ICustomAttributeProvider provider)\r\n at System.Web.Services.WebMethodReflector.IncludeTypes(LogicalMethodInfo[] methods, XmlReflectionImporter importer)\r\n at System.Web.Services.Protocols.SoapClientType..ctor(Type type)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()\r\n at VaultClientNetLib.ClientService.VaultService..ctor()\r\n at VaultClientNetLib.VaultConnection.InitService(AccessLevelType accessLevel)\r\n at VaultClientOperationsLib.ClientInstance.Init(AccessLevelType accessLevel)\r\n at WebProjectProp.Propper.LoginVault() in c:\\dev\\webprojectprop\\propper.cs:line 55


What's strange is that I can fix it if I put the VaultLib.dll in the SAME directory as the *executable*. i.e. regardless of working directory or path, it doesn't seem to find it.

Thoughts? I'm making a VS addin, so putting vaultlib.dll in VS's dir seems just evil.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Mon Jun 13, 2005 9:08 am

I'm not sure what's going on with this one. Have you tried putting all of the Vault libs in the same directory as your plugin lib? There could also be a problem because Vault version before 3.1 are not strongly named.

djMax
Posts: 32
Joined: Wed Dec 01, 2004 1:05 pm
Location: Boston, MA

Post by djMax » Tue Jun 14, 2005 1:56 pm

Registering 3.1 in the GAC fixed the problem, though it's cause still eludes me.

Locked