Error Creating Debug Information - Code Won't Compile

前端 未结 19 2096
深忆病人
深忆病人 2021-02-18 15:04

I\'m using VS 2008. When ever I make a change in my code and try to compile I get the following error:

Error 7 Unexpected error creating debug informa

相关标签:
19条回答
  • 2021-02-18 15:16

    I also had the same issue. Tried all the suggestions above with no luck. I eventually change the Build Configuration from Debug to Release, the solution built...

    0 讨论(0)
  • 2021-02-18 15:21

    Old topic, but something that worked for me. I had 2 projects in my solution, a class library type project and a windows form project. The windows form project was referencing the compiled binary and not the project itself in my case which was causing the lock. After changing the reference to the class library project, it worked properly.

    0 讨论(0)
  • 2021-02-18 15:22

    I changed the 'StartUp Project' of my solution to a project without reference to the locked file's project. This solved the issue for me using VS 2010 SP1.

    (Process Explorer said msvsmon.exe (started by devenv.exe) locked the pdb file. After changing the startup project the processes msvsmon.exe and .vshost.exe disappeared and so did the file handle.)

    Alex Clark, thank you for pointing me in the right direction.

    0 讨论(0)
  • 2021-02-18 15:23

    Since you say you have it on all applications you work on it sounds like a more global problem. You could try and reinit the vs2008 by writing

    devenv.exe /setup

    Edit: link to command line options

    0 讨论(0)
  • 2021-02-18 15:25

    If you have multiple instances of VS open, close other instances (apart from the one you are trying to compile) - this may resolve the issue.

    0 讨论(0)
  • 2021-02-18 15:27

    To avoid that problem just open the project properties, go to Debug tab an untick "Enable the Visual Studio hosting process"

    0 讨论(0)
提交回复
热议问题