Error Creating Debug Information - Code Won't Compile

前端 未结 19 1968
深忆病人
深忆病人 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:39

    I had the same problem this morning and noticed that I had another project open that had a reference to the one that would not compile or debug. I removed the reference (as I didn't actually need it) and it was fine.

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

    This works for me with web projects in Visual Studio Express 2012 for Web:

    1. Press F5 to begin debugging
    2. "Do you want to execute last successful build?" - hit YES
    3. At this point you could try a request - not sure if this step is necessary
    4. Hit the stop button
    5. Recompile successfully
    0 讨论(0)
  • 2021-02-18 15:40

    I have solved a similar problem by adding these lines as a pre-build event:

    if exist "$(TargetPath).locked" del "$(TargetPath).locked"
    if exist "$(TargetPath)" move "$(TargetPath)" "$(TargetPath).locked"
    

    With proper modifications, it might help your problem.

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

    Have you tried closing VS, deleting obj folder then restarting VS?

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

    I just came across the same problem today. And then I realized what went wrong: I had couple of Visual Studio windows opened at the same time, and one of them was in debug mode.

    When I stopped debug mode in that one, the problem was solved.

    That happens when you have a "fistfull of VS windows" opened.

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

    I had this issue today. In my case, I had just grabbed the data from my company's source control and instantly hit this issue when I tried to compile the project. The issue ended up being that the \bin folder was set to Read Only. To solve the issue, I just made the folder not Read Only.

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