none
After installing VS 2003 SP1 "Error while trying to run project: Unable to start debugging"

    Question

  • Hi,

    After I installed Visual Studio 2003 SP1 I can't debug my Office COM AddIn anymore. I get the message:

    Error while trying to run project: Unable to start debugging

    Unable to start program <office application>

    Having googled I checked various things like:

    1. That unmanaged code debugging is enabled

    2. Com security to ANONYMOUS LOGON is set

    3. thousands of other suggestions regarding reregistering random dlls

    but nothing helps.

    Ive been able to replicate this on a virtual machine but I am reluctant to accept that a SP breaks all my existing projects.

    Is there anybody out there who knows how to make COM add ins and VS SP1 work together?

     

    Any help very much appreciated. Many thanks in advance.....

     

    Regards

    Patrick

    Tuesday, November 28, 2006 1:12 PM

Answers

All replies

  • Hi Patrick,

    Is your COM dll managed or loading any managed code? If so, this might help:

    http://blogs.technet.com/monicaboris/archive/2006/09/06/454421.aspx

    Monica Boris

    Visual Studio Debugger Team

    Wednesday, November 29, 2006 7:09 PM
  • Thanks Monica - it was the bloody 2.0.

    Your Tip helped!

    Regards

    Patrick

    Thursday, November 30, 2006 11:37 AM
  • Sadly, this did not work for me.  It appears I may have to completely uninstall 2003, restore registry, and reinstall.  This is a full days work!  :(
    Tuesday, January 23, 2007 7:19 PM
  • Hi Monica,

    I am receiving the message: "Error while trying to run project: Unable to start debugging" it also adds the line:

    "The binding handle is invalid"

     

    am I going to have to do the following for each and every project that I create or can the debugging be re-routed to the earlier verson?

    Create a file called <your exe's name>.exe.config with the following contents and place it next to your exe on your machine:

    <?xml version="1.0"?>

     <configuration>

                 <startup>

                    <supportedRuntime version="v1.1.4322"/>

                    <requiredRuntime version="v1.1.4322" safemode="true"/>

                </startup>

    </configuration>

    This will force your exe to load the 1.1 version

     

    thanx

    CF

     

    Friday, January 26, 2007 4:07 PM
  • Hi Monica,

    Last year I developed a Windows Forms dll using VB.NET in Visual Studio 2003 SP1 on Windows XP SP2. When I start with debugging, I get an error "Error while trying to run project: Unable to start debugging. <newline> Unable to start program: '<path to exe that uses my dll>'." No further text in the error message about installing debugger, about webservices or whatsoever. When I start without debugging, I don't get this error.

    I read you blog-page and noticed that I have indeed different versions of the .NET Framework on the development machine. One of them is version 2.0. But because I've developed a dll and not an exe, I guess it doesn't make sense for me to create a <app-name>.exe.config.

    I uninstalled .NET Framework 2.0 and restarted my PC. Same behaviour.

    How can I force VS debugger to use .NET 1.1 in case of dll, similar to your config-file?

    Or am I on the wrong track?

    Monday, February 12, 2007 3:46 PM
  • Hi Kristof,

    This might help:

    1. Create this key:

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\AD7Metrics\Engine\{449EC4CC-30D2-4032-9256-EE18EB41B62B}

    2. Create the following REG_SZ value under this key:

    CLRVersionForDebugging = v1.1.4322

    How do you debug your dll? Don't you have a client app that calls this dll? If this is the case,  and the reg key doesn't do the trick, you need to create a .config file for the app that calls the dll.

    Hope this helps,

    Monica

     

    Tuesday, February 13, 2007 12:05 AM
  • Monica,

    Thanks for your response.

    1. It seems I don't have HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0. I do have HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\... and HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\VSUpdate\...  

    Should I add the "8.0" key and all subsequent subkeys? Or are we talking about different versions of Visual Studio?

    Perhaps some extra info on my project. The class library I developed contains COM classes that are registered as additional toolbuttons and menu-items for an existing, commercial software product. I set the exe of this software product as "Start action: Start external program".

    Last year, on the PC that I used for build the current source, this worked perfect. When, in VS, I started with debugging, the software product started and my toolbuttons and menu-items were visible. So as soon as I tried one of my toolbuttons, I reached a breakpoint in the VS source code.

    All this, to explain why it seems not logical to me to add a config file to this commercial software product (that might not even be developed in VB.NET, I don't know). I'm willing to try if you still think it might solve my problem.

     

    Tuesday, February 13, 2007 9:09 AM
  • Oh, I see, sorry, this key would not work for VS2003. I think the config solution would work. All you need to do is create a config file (if your commercial software product is called, let's say "CoolProduct", then the config file should be named CoolProduct.config.) with the contents from my blog. Whe managed code from your dll will run inside this product's process and that's why having the config file for the product makes sense.

    Hope this helps,

    Monica

    Wednesday, February 14, 2007 7:03 PM
  • Please Open  "Computer Manager",在"服务(Service)"里将“Terminal Services”改成"手动(Manual)",并启动(Start)"服务(Service)"。

    Friday, August 10, 2007 11:56 AM
  • Yes, the previous post is correct.

     

    VS2005 has the same problem. It does not debug applications unless Terminal Services is running ( at least on my XP Pro box )

    Just setting service to manual did not work, It had to be running, so I've set it the serviec back to automatc startup.

    Friday, September 14, 2007 8:06 PM