Visual Studio connected to the process in debug mode

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.

+1
source share
2

, 1 > debug dll. 2 > excel my.dll . 3 > visual studio 2010: - > configurationproperties- > debugging- > command = excel.exe 4 > properties- > configurationproperties- > debugging- > Attach = yes

F5 . my.dll, .

+1
  • Express Edition, .
  • tp.dll , my.dll.
0

All Articles