none
"Unable to start debugging" error RRS feed

  • Question

  • Hi, I am trying to create an Excel 2003 Addin with Visual Studio 2008, targeting 3.5 framework. When I try to debug the add-in, I am presented with the following error:

    Unable to start debugging. Check for one of the following:

    1. The application you are trying to debug uses a version of the Microsoft .NET Framework that is not supported by the debugger.
    2. The debugger has made an incorrect assumption about the Microsoft .NET Framework version your application is going to use.
    3. The Microsoft .NET Framework version specified by you for debugging is incorrect.

    The machine I am running it on is Windows Server 2008 64-bit, the machine also has Visual Studio 2010 with framework 4.0, so I'm not sure if that is causing the problem.

    Could anyone give me some pointers what/where to check. If it is a case of visual studio using the wrong version of the .net framework, how do i check?

    If it does require a registry change, is it possible to leave the framework Visual Studio 2010 unaffected by what I change?

    Thanks for your time

    Monday, April 30, 2012 11:40 AM

Answers

  • after complete reinstall of office 2003 and updates, uninstall vstor 2010 and reinstall vstor 3.0 (do not change order) and try again. 
    • Marked as answer by Dave_JB Thursday, May 3, 2012 4:48 PM
    Wednesday, May 2, 2012 4:14 PM

All replies

  • how do you try to debug your add-in? by attaching debugger to running process? please check 'Attach to' field in debugger, it should have value Managed (v2.0, v1.1, v1.0) code
    Monday, April 30, 2012 12:02 PM
  • Thanks for the reply.

    Its worth me mentioning I do not know much about configuration of debugger settings...

    I've checked and changed the 'Attach to:' field to Managed Code. Same error. Any more suggestions?

    Monday, April 30, 2012 1:20 PM
  • show screenshot of 'attach to process' window
    Monday, April 30, 2012 1:31 PM
  • Nice one. See below:


    • Edited by Dave_JB Monday, April 30, 2012 1:45 PM
    Monday, April 30, 2012 1:44 PM
  • if i undetstood you correctly, this machine also has VS10 installed? try using it to debug your add-in.
    Monday, April 30, 2012 1:49 PM
  • Its my understanding that Office 2003 is unsupported by Visual Studio 2010. Every article/forum post seems to suggest this, they say you need to use VS2008.

    When I attempt to run this in VS2010, i dont get the debugger error, but the addin fails to load:

    File or assembly name Microsoft.VisualStudio.Tools.Applications.Runtime, or one of its dependencies, was not found.


    ************** Exception Text **************
    System.IO.FileNotFoundException: File or assembly name Microsoft.VisualStudio.Tools.Applications.Runtime, or one of its dependencies, was not found.
    File name: "Microsoft.VisualStudio.Tools.Applications.Runtime"
       at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark)
       at System.AppDomain.Load(String assemblyString)

    === Pre-bind state information ===
    LOG: DisplayName = Microsoft.VisualStudio.Tools.Applications.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
     (Fully-specified)
    LOG: Appbase = C:\Program Files (x86)\Microsoft Office\OFFICE11\
    LOG: Initial PrivatePath = NULL
    Calling assembly : (Unknown).
    ===

    LOG: Application configuration file does not exist.
    LOG: Publisher policy file is not found.
    LOG: Host configuration file not found.
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
    LOG: Post-policy reference: Microsoft.VisualStudio.Tools.Applications.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Office/OFFICE11/Microsoft.VisualStudio.Tools.Applications.Runtime.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Office/OFFICE11/Microsoft.VisualStudio.Tools.Applications.Runtime/Microsoft.VisualStudio.Tools.Applications.Runtime.DLL.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Office/OFFICE11/Microsoft.VisualStudio.Tools.Applications.Runtime.EXE.
    LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Office/OFFICE11/Microsoft.VisualStudio.Tools.Applications.Runtime/Microsoft.VisualStudio.Tools.Applications.Runtime.EXE.

    Monday, April 30, 2012 2:16 PM
  • for developing yes, VS2010 does ot support office 2003, but debugging running code is possible. Can you show in message box in your addin (for example in startup event) output of following line: Environment.Version ? What numer does it show?
    Monday, April 30, 2012 2:21 PM
  • Unfortunately it does not get that far. It does not enter the startup event - When i start debugging, Excel launches, then the error above about not being able to load the addin.
    Monday, April 30, 2012 2:48 PM
  • do not start debugging as this. Compile add-in in VS 2008 to show this message box, open up excel with your add-in and that's it.
    Monday, April 30, 2012 3:10 PM
  • I think I might be missing something, you mean to have a message box within the 'ThisAddIn_Startup' event, right? Debugging/comiling the msi (and installing), both result in the same thing - excel loads with no trace of an addin (and the message box), or it Excel loads with the 'File or assembly name Microsoft.VisualStudio.Tools.Applications.Runtime, or one of its dependencies, was not found' error detailed above.

    How can something so small be causing me so much pain!

    Thanks for your help!

    Monday, April 30, 2012 4:03 PM
  • ok, let's start with basics. Do you have .net 3.5 feature in windows enabled? if you create simple console app in vs2008 on that machine that outputs Environment.Version, what does it display?
    Monday, April 30, 2012 5:59 PM
  • It displays 2.0.50727.5420 to be exact.
    • Edited by Dave_JB Tuesday, May 1, 2012 9:14 AM
    Tuesday, May 1, 2012 8:21 AM
  • is vstor 3.0 installed on that win2008 machine? Is VSTOR 2010 _not_ installed on that machine?
    Tuesday, May 1, 2012 7:26 PM
  • It looks like both VSTO v3.0 and 2010 are installed

    I have uninstalled v2010 and tried again. Nothing has changed, same error. Any more ideas?

    Thanks

    • Edited by Dave_JB Wednesday, May 2, 2012 11:25 AM
    Wednesday, May 2, 2012 11:10 AM
  • I have also done a 'complete' Office 2003 professional reinstall, service packed to SP3
    Wednesday, May 2, 2012 1:42 PM
  • after complete reinstall of office 2003 and updates, uninstall vstor 2010 and reinstall vstor 3.0 (do not change order) and try again. 
    • Marked as answer by Dave_JB Thursday, May 3, 2012 4:48 PM
    Wednesday, May 2, 2012 4:14 PM
  • Problem sorted. It seemed to be the multiple versions of VSTO causing the issue. I uninstalled all VSTOs on the machine and installed VSTO v2 only.

    Pretty simple, but harder to spot when you're so frustrated about it!

    Thanks very much for the guidance Damian!

    Thursday, May 3, 2012 4:48 PM