“Symbols for the module MyLibrary.dll were not loaded”?

微笑、不失礼 提交于 2019-12-03 22:16:46

You can go to the Project Properties -> Build -> Advanced button -> Debug info drop-down and change its value to "full".

In Visual Studio I selected Build -> Clean Solution. That got rid of this message

I just fixed the same error. I went to Tools -> Options -> Debugging -> Symbols and pressed Empty Symbol Cache in Visual Studio 2013. Probably trashing your bin and obj folders does pretty much the same in a much less elegant way.

I was having this error when I had an assembly that was in the GAC and Visual Studio was not removing it before compile/debug. I was able to resolve it by removing that library (dll) from the GAC.

//if pokelib.dll contained assembly: PokeLibrary.Pokemon 
//and it showed up in the GAC (c:\windows\assembly\) with that assembly name
gacutil /u PokeLibrary.Pokemon

This resolved the warning condition and allowed me to debug once again.

You are debugging your code with an referenced dll that does not compiled for debug mode.

Compile referenced dll in debug and use it.

Check the referenced dll adresses to be sure you are using correct dll.

Make sure you do not have multiple VS windows open, specifically of the same project! :)

In my case I had another version of the application running that was using the same .dll. This prevented the GAC getting updated with the debug version. I had the kill the process through task manager.

The only way that I can get around this message is to go to Debug > Options and Settings > Debugging > Symbols, and then selecting the radio button named 'All Modules, unless excluded.'

I'm not sure that this is the ideal workaround, but it's working for now.

You can use DotPeek to generate PDB files for the library, then place it in the same folder as your dll. One more option, if the code is open-source, is to clone the repo, add the project to your project, add dependency, set build order and start debugging.

I found that the project I was receiving the message about, was being optimized when built.

I went into the projects properties, Compile Tab, Advanced Compile Options... and unchecked the Enable Optimizations checkbox

  1. close visual studio.
  2. Performed quick cleanup using cclener.
  3. Clean solution & Rebuild project

& this worked for me. ( I really don't know how )

this is how mine got fixed,

I had the same page open in two browsers and at first I choose 1st browser then 2nd browser fro debug without closing 1st browser, closing one of them fixed it...

I also faced the same error and in my case the problem was because of web.config transformation file which I wanted to setup other than debug.config.

I had to track a bug using stage branch and therefore I setup the active solution configuration as Stage.

  • Go to the property option of your project solution
  • Click on Configuration Manager button on top right hand side.
  • Now drill down the drop down option active solution configuration and you choose configuration (web) file for your project to act on when you run it.

I had chosen the stage and when I build the project I got this error and because of that debuggers were become inactive.

But when I set the option back to debug, issue got resolved.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!