Hi Simon,
I suggest you try these steps:
· Rebuild your whole project.
· Start Excel on its own (not under the debugger).
· Attach you Visual Studio to the Excel process using the Debug->Attach to process dialog. Ensure that the right debugger engine is selected (click on the EXCEL.EXE process, then look at the Attach To: part, and set this to Managed (v4.5, v4.0) code).
· Attach the debugger.
· Now File->Open your add-in in the bing\Debug directory.
· Debugging and breakpoints should work.
Once you’ve done this, future debugging sessions will remember which engine to use and all should be fine.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Hi Simon,
Setting LoadFromBytes=”false” means you can’t rebuild the project while Excel has the add-in open.
The “Book2” situation is normal – it happens if your add-in attempts to connect to the COM object model before it is properly initialized. To force Excel to initialize it, Excel-DNA opens a workbook, which it immediately closes again – that one was Book1. So the next book opened will be Book2. This should have no other side-effects, and I know of no other way to get Excel to initialize COM in that setting.
-Govert