Le réseau pour les développeurs > Forums - Accueil > Visual Studio Debugger > "unable to attach to the process" when debugging in VS.2003
Poser une questionPoser une question
 

Traitée"unable to attach to the process" when debugging in VS.2003

  • vendredi 14 avril 2006 00:15Vladimir Lashchev Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    Hello,

    I have both Visual Studio 2003 and Visual Studio 2005 installed on my workstation. I have some big projects that are not transitioned from 2003 to 2005 yet and I have to debug thier code now.

    But after I installed VS.2005 "Attach to a process" feature stopped working in VS.2003. When I try to attach to a process that has .Net 1.1 assemby running it always gives me an error "unable to attach to the process" with no further explanation.

    Re-registering mscordbi.dll didn't help:

    regsvr32 C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscordbi.dll

    Any iseas how I can fix 2003 so I can continue working in it?

    Thanks, Vladimir

Réponses

  • lundi 1 mai 2006 21:15Bill DiPierre Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    By default apps will run against the later framework if it is installed.  This will cause the error you are seeing in VS 2003.  To force your apps to run against framework v 1.1 add the following to their config files

       <startup>

          <supportedRuntime version="v1.1.4322" />

       </startup>

    hth
    Bill

Toutes les réponses

  • samedi 15 avril 2006 00:16Gregg MiskellyMSFT, ModérateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Does the process have the 1.1 or 2.0 version of mscorwks.dll (you can check with listdlls from www.sysinternals.com)
  • lundi 1 mai 2006 21:15Bill DiPierre Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
    By default apps will run against the later framework if it is installed.  This will cause the error you are seeing in VS 2003.  To force your apps to run against framework v 1.1 add the following to their config files

       <startup>

          <supportedRuntime version="v1.1.4322" />

       </startup>

    hth
    Bill

  • lundi 8 mai 2006 06:00barnabya Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    I'm using VS2003, but have .Net framework v2.0 installed. These are incompatible - I can't attach to a process to debug CLR code when the app has invoke .Net v2.0. Such was the case writing my BHO for IE. However, the message was frustratingly vague: "Cannot attach to process"
    I defined a .config file for IE and required .Net v1.1, and now I can debug my BHO code!

    Thanks for the notes

  • vendredi 26 mai 2006 07:51Anders G Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

    I have the same problems but since we only have Class Libraries (no exes) that are called from VB6/COM it is not possible to add a specific config file for the "application".

    Are there other solutions to this problem?

    BR

    Anders

  • mercredi 14 novembre 2007 21:18Nightsfall Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Réponse proposée

     

    This is what I did to solve that problem. Basiclly I went to the IIS settings , and I change the project's ASP.net configuration back to 1.1 for the the 1.1 project. When I attached the debug process ,  I had two asp.net_wp.exe for me to choose. If it is asp.net 1.1 then I choose the 1.1 exe, if it is 2.0 then I choose the 2.0 exe. I do not know if this could apply to your case.
    • Proposé comme réponseKish B mercredi 5 août 2009 15:27
    •  
  • jeudi 29 novembre 2007 19:52arun gaikwad Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     

     

    This was a gr8 help friend.
  • vendredi 1 août 2008 11:51CDH2009 Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    I had the same "unable to attach to the process" issue in a remote debugging setup, with my Visual Studio.Net trying to debug an 1.1 ASP.Net application on a remote W2003 x86; I thought it had to do with a security issue, but just switching the remote IIS from the ASP.Net 2.0 runtime to 1.1 did the trick
  • mercredi 5 août 2009 15:27Kish B Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    Thanq. This did the trick.