views:

136

answers:

2

I have a C# windows form application (Actually it is a IE toolbar application), I have been working with it in VS2005 for years and everything is fine. Recently, I upgrade my IDE to VS2008, and also import that project to VS2008, but after import, in VS2008 I can't start debugging any more, it always show: "Error while trying to run project: Unable to start debugging"

While import, I kept the same .net framework as in VS2005, double checked the debug setting is same as vs2005. I can compile the project without any issue.

Thanks.

+1  A: 

If you aren't starting with a new code directory ad you haven't already, try Build - > Clean, Build -> Rebuild. That sometimes cleans the gunk out. I always feel likes that's the visual studio equivalent of "reboot your computer" advice, but it's cliche because it often works.

I know Rebuild was at least originally supposed to be the same as Clean + Build, but sometimes need to do it anyway.

Jim Leonardo
@Jim, thanks, I tried clean it but still have the same issue, I found it is related to add-in-express module.
+1  A: 

Two things:

  1. Verify that .NET 3.0+ is installed on your machine. (not likely to be your problem but just a simple 'sanity check')

  2. Here's a thread describing the same problem that you're experiencing on an IE addin project. The solution that worked was to add "about:blank" (or any URL) to the debugging command line arguments.

    Maybe the problem isn't due so much to the upgrade to VS2008, but to differences to how VS2005 and VS2008 debug IE addins, or perhaps this is a setting you haven't migrated to VS2008. It's worth a look though.

Jay Riggs
@Jay, I double checked, my computer does have .net framework 2.0SP2, 3.0SP2 and 3.5SP1 installed. also my application only use 2.0. Thanks for the link, I use add-in-express for ie too. I created an empty add-in-express for ie application, I can't debug that one either, so I guess it must be something wrong with the add-in-express module. Thanks.
I tried to add command line arguments, it does solve the issue. Thanks a lot.