how to debug Excel COM Add-in from VS2003

K

kfarris9

I created an Excel COM add-in from Visual Studio 2003. I can't attach to the
Excel process to debug it. Is there some other way to debug the C# code?
 
K

kfarris9

When I do this, excel flashes and then dies. Then, if I start Excel outside
VS I get an error message;

Excel experienced a serious error the last time the add-in 'myaddin' was
opened. Would you like to disable this add-in?
 
X

XL-Dennis

OK and I believe it refer to the lack of a config. file.

If You create the following xml file and save it in the same directory where
Excel.exe is loctated will that be of help?

Name of the file: Excel.exe.config
Important: replace the below version of .NET Framework to Your version.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<requiredRuntime version="v2.0.50727" safemode="true"/>
</startup>
</configuration>

Since Excel has some issues with Your assembly it's classified as bad next
time You open Excel. Make sure that it does not get 'silent' blacklisted
which You can check with the command Help | About Microsoft Excel | The
button 'Disabled Items'.

I made a search at MSFT Knowledge Base but couldn't find any relevant info
for this case.

---------------
With kind regards,
Dennis
Weekly Blog .NET & Excel: http://xldennis.wordpress.com/
My English site: http://www.excelkb.com/default.aspx
My Swedish site: http://www.xldennis.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top