Link to home
Start Free TrialLog in
Avatar of tfsln
tfslnFlag for New Zealand

asked on

VB.NET 2008 - When i add a COM reference it copies it to the Obj folder

I'm adding an old com reference; msadox.dll (for creating a ms access database)

Like other dll's, i keep them in the project directory so that when i give the code to other people, we wont have missing dll problems.

So i copy msadox.dll to the project folder (C:\Projects\TestProject\msadox.dll), add reference, browse, select this file.

When i do this, the reference location is set to;
C:\Projects\TestProject\obj\Debug\Interop.ADOX.dll

Its not even the same file? Whats going on? I do not want dependencies in the bin or obj folder because i delete these folders before sending the code (because it makes the zip file way smaller)
Setting copylocal to false (which is true by default when i add this reference) seems to do nothing.
Avatar of funwithdotnet
funwithdotnet

It's an interop assembly.
Not sure if it will work as desired, however I believe there is a utility that can create a .dll from the COM assembly with the metadata:
http://msdn.microsoft.com/en-us/library/xwzy44e4.aspx

Perhaps you can reference the resulting .dll and do things the way you are used to.
ASKER CERTIFIED SOLUTION
Avatar of kaylanreilor
kaylanreilor
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tfsln

ASKER

Great, thanks!