I have a strange problem.
The DLL that I built (called my.dll) in Visual Studio 2010 uses a third-party library (say tp.lib), which in turn calls a third-party dll (say tp.dll).
for debugging prupose, I have in the command configurationProperties-> debugging->: Excel.exe and configurationProperties-> debugging-> commandArguments: "$ (TargetPath)"
on my computer, I also set the PATH variable to the directory where tp.dll is located
Now when I press F5 in visual studio excel, my.dll opens and fails, which gives me the error “cannot open in dos mode”. the reason for this is because tp.dll does not expand when you deploy the debug version of my.dll.
when I open the excel instance separately and manually drop the debug version of my.dll, then everything works fine, and I can see all my functions that I wrote in my.dll
The only problem now I do not know how to debug, because I do not know how to attach a visual studio to an excel instance that I opened separately.
my question is:
1> How can I connect a visual studio to an already open instance of Excel
or
2> how can I press F5 and still do Excel collect the required tp.dll from the directory specified in the PATH variable before it starts to deploy my.dll.
either of these two options will allow me to execute code for debugging purposes.
early.
source
share