The Following Module was built either with optimizations enabled or without debug information

后端 未结 30 2064
离开以前
离开以前 2020-12-04 07:30

I cannot get rid of this in my VS 2008 web project when debugging. I\'ve checked that it\'s in debug mode on the non-web project in question and it\'s in Active(Debug). De

相关标签:
30条回答
  • 2020-12-04 08:08

    Had this happen to me on a VS 2010 winForms project. Seeing that the majority of people here have web projects, i think that it has to do with access to the folder in which the project is stored. I say this because when this problem occurred to me Google Drive was synchronizing the folder in which i keep my projects. It seems that just disabling the synchronization does not fix the problem.

    My solution is similar to one of the answers above:

    • Went to "Project Properties > Compile > Advanced Compile Options"
    • Checked "Enable optimization"
    • Set "General debug info:" to "None"
    • Unchecked "Define DEBUG constant"
    • And pressed OK
    • Then went back and returned the options to their initial state.

    Hope this helps someone as it seems this still happens.

    0 讨论(0)
  • 2020-12-04 08:08

    I had the same problem after building with a Release configuration. It turned out that when I switched back to Debug, VS wasn't detecting any differences, so it was not updating the .dll and .pdb files in the bin folder.

    Here's what worked for me:

    1. Run iisreset (to clean up the temporary folders)
    2. Save the web.config (to force VS to actually rebuild)
    3. Rebuild on Debug
    4. Start the project
    0 讨论(0)
  • 2020-12-04 08:09

    I just ran into this issue, and quickly decided that the other answers posted didn't apply to me.

    disable

    I'm the owner of the project, and I know it was built with debug information, as well as without optimizations. Furthermore, I'm never happy choosing the disabling of a warning as my first choice. Hiding/ignoring this warning could become an issue in a future debugging session.

    Since this only started occurring after I signed the assembly, this clued me in on my quick fix: temporarily remove the strong name of my DLL (and consuming EXE). Voila! Problem solved.

    A better, long-term solution, could take the form of adding a post-build action to update the GAC so it has the latest version of the signed DLL.

    But for now, I'm happy to move on from this diversion, and continue working on the issue that brought me to this debugging session.

    0 讨论(0)
  • 2020-12-04 08:09

    I had the same issue on my web project in Visual Studio 2010, and finally I found the reason why I was getting this message. What I did was to change an existing debugging option on Visual studio:

    • Go to Tools->Options->Debugging->Symbols->All modules
    • Check the "unless excluded" radio button
    • Click on the link "Specify excluded modules", then remove the DLL that you want to debug.

    In my case it was my web dll file...

    0 讨论(0)
  • 2020-12-04 08:09

    Follow this : (first STOP debuging)
    1:right click on project solution name or project -> Properties
    2:under Configuration Properties select configuration Manager
    3:Change configuration to debug and click on close
    4:Change configuration to debug and click on Apply -> OK
    Now rebuild solution....!

    0 讨论(0)
  • 2020-12-04 08:10

    I had this issue with a solution in a certain folder, but if I moved it to another folder or others built it, I didn't get the message. I did the clean, rebuild, and even rebooted and still couldn't get the original to debug without this message. I searched my system for copies of the file causing the error and I found that copies were kept in

    c:\User\username\AppData\Local\Assembly\dl3

    This was on Win7-64 but will be similar on other Windows OSes. I deleted all of the copies I found there and I no longer get the message. I didn't need to uncheck the "Enable Just My Code".

    Also, this was for a WPF app, but I came across this thread in my search so hopefully this will help someone else.

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