Home
TeamSite
iManage.dll vs. Interop.iManage.dll. Which one to reference?
mlf
Using Visual Studio and C# I can add a reference to iManage.dll or Interop.iManage.dll and they seem to be essentially the same thing.
Only difference I can see is that the namespaces are different iManage vs. Com.Interwoven.WorkSite.iManage respectively.
Which is the recommended dll to reference in your project and why?
Find more posts tagged with
Comments
Migrateduser
yes, the namespaces are different and also because interop.imanage.dll is handcrafted, some of the parameters etc may be optimized for better interoperatability.
I would recommend interop.imanage.dll because, if you upgrade or integrate with other app, you dont to change your code ( hopefullly)
Thanks
Sheetal
Sheetal Jain
www.prosperoware.com
sheetal@prosperoware.com
rjb09
interop.iManage.dll is a mapping file created by visual studio to map a COM object (iManage.dll) to something that .net assemblies can understand.
without it you would have to manually map it, and trust me, that's not pretty.
Anyway, it all depends on how your project is configured. If you reference iManage.dll, visual studio will create a interop.imanage.dll and that's what will get deployed with your application. This is ok for a single project solution.
However, if you have for example two projects, one with a UI and another a class library (.dll), and you reference iManage.dll in both, it won't work. If you try to pass an IMan object of any type between the project, you will get a compilation error, something like "cannot convert from iManage.IManDocument to iManage.iManDocument"), it doesn't seem to make sense but it's how com interop works. The reason being that each project will have its own interop.imanage.dll and they are considered to be different classes by the compiler.
In that case, you need to add a reference to iManage.dll (COM object) in one project, to create the interop.imanage.dll, and then referece interop.imanage.dll from the other project.
Hope it makes sense.