in

ASP.NET Weblogs

Russell Pooley's .NET Blog

.NET Tools, Source and Research

Trying to debug Outlook 2003 addin, always getting 'cannot attach to process' error

After trying to debug an addin for Outlook 2003 with no joy I turned to google for support, this on previous attempts had not come up with any good solutions but I managed to find the following post: http://www.analogousmember.com/archives/000394.html that resolves the solution.

It appears that outlook will try to load up the 2.0 framework when debugging thus would not allow .NET 2003 to debug it. The solution is to create an Outlook.exe.config and force it to use a 1.0 or 1.1 framework and then everything is fine, now I can get on with the job in hand.

<configuration>
   <startup>
      <supportedRuntime version="v1.1.4322"/>
      <supportedRuntime version="v1.0.3705"/>
   </startup>
</configuration>

Comments

 

hupu said:

You're a life saver!

After 2 days of googling, searching, thinking, trying, cursing, hitting the table, calling the saints to destroy Microsoft and so on...

Near the moment when I was thinking about suicide... I finally found your post. It's amazing how simple the solution to this problem is.

I'll detail my case here, hoping that Google will rank it higher when somebody searches for this topic:

I created an Outlook Add-in with Visual Studio 2003 (based on the following article: http://blogs.msdn.com/dancre/archive/2004/03/21/93712.aspx) and tried to debug it as described in the same article's comments. But Outlook kept crashing when I tried to debug my Add-in. Creating Outlook.exe.config with the above mentioned contents, "magically" everything worked fine.

The keywords would be:

Cannot debug Outlook Add-in

Outlook crashes when debugging Add-in

Debug Outlook Add-in

How to debug Outlook Add-in (see a detailed description among this articles comments: http://blogs.msdn.com/dancre/archive/2004/03/21/93712.aspx)

December 18, 2006 6:53 AM

Leave a Comment

(required)  
(optional)
(required)  
Add