Professional Programmer Notes

or just call this my soapbox

Posts Tagged ‘vs

Debug an IE Add-On in Visual Studio 2008

leave a comment »

I’m working on a project that involves creating an IE Add-On in C#.  It is an inherited project that was created in Visual Studio 2005 targeting the .NET Framework 2.0.

Well, times have changed.  I am now doing most of my development in Visual Studio 2008, and (when lucky) I am using the features of the .NET Framework 3.0 or higher.  When I first made the switch, I tried to use 2008 to continue my work on the toolbar, but I failed miserably.  I was shocked to find out that my process of registering my assembly in a post-build action and launching IE as a Start Action did not work in 2008.  At the time, I quickly got over it, and preserved 2005 just for that project.

Luckily, in a more recent attempt to use 2008 for this type of development, I was able to solve the problem.  Check it out.


Whenever I tried to debug my IE Toolbar project in Visual Studio 2008, I would get a nasty exception that says, “Error while trying to run project.  Unable to start debugging


My project is configured to register the assembly using regasm in a Post-build step.  Then, as you can see below, the VS Debugger is configured to start Internet Explorer (and subsequently attach to the process).


Well, that was the wrong way of doing it.  I was able to get it to work successfully by modifying the Start Action like such:


And it worked!

UPDATE:  I still had issues on a separate computer.  Adding “about:blank” to the command line arguments fixed the issue.


Written by curtismitchell

May 6, 2009 at 3:25 pm