I have a project that "Register for COM interop". It references a few dlls, which are not copied locally (intentionally). Because of this, register to coms will fail because it can't find the dlls, even though the relative paths are set in the "Project References".
Is there a way to get around this?
We have Interop functions to call things like ArcGIS and other third party software. Its not a version issue, its Visual studio 2008 not finding my own dlls we created in another directory. VS found them because it used them to build the solution but when it comes time to register, it forgot them for some odd reason.
Thanks jboyd and Krishna for your help.
Welcome to MSDN Forum.
1. Please ensure that such relative path “..\..\..\..\..\projectA\bin\” is available based on the current folder where the regasm.exe command tool is running.
2. The option /asmpath:directorymust be used with the /regfile option.
The option /asmpath:directoryspecifies a directory containing assembly references.
e.g. regasm myTest.dll /asmpath:C:\ /regfile:myTest.re
3. You can add multiple search paths into system environment variables, so that the regasm.exe can search assembly references from multiple directories.
There are some cases discussing the similar issues for your reference.
Case: regasm.exe requires asmpath to find framework dlls on some PCs
Case: Multiple search paths for assemblies not in the GAC when using REGASM & COM
If you have any suggestion or feedback, you‘re welcome to submit it to Microsoft Connect feedback Center.
Martin Xie [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Edited by Martin_XieModerator Thursday, September 29, 2011 11:38 AM