"No symbols have been loaded for this document." But they have!
Solution 1
I am finding the same behavior from time to time when debugging silverlight. My solution is to clean the browser's cache (on latest IE click on the wheel button, Developer tools), as it sometimes will cache the binary files and not load the new ones.
Perhaps is could be the same with your views?
Solution 2
Sometimes if you have a hard stop, Visual Studio temp cache will be screwed. Clear the cache by deleting these folders:
C:\Windows\Microsoft.NET\Framework\<.net version>\Temporary ASP.NET Files\(ApplicationName)
C:\Windows\Microsoft.NET\Framework64\<.net version>\Temporary ASP.NET Files\(ApplicationName)
Solution 3
Been messing with this problem for a couple hours trying everything above. I finally changed my Target Framework to .NET Framework4.5 and it all started magically working.
Solution 4
For me, I somehow switched my target build to Release
instead of Debug
Solution 5
This is always weird. I just had this problem and solved it with a full rebuild of the entire solution.
There was also another strange symptom, though: a new unit test that I had written using NUnit, mocking with NSubstitute, wouldn't pass because NSubstitute wasn't returning what I wanted it to return. I lost a few minutes trying to figure out if I did something wrong programming NSubstitute, then when I tried to attach the debugger to the NUnit GUI I saw that warning.
That's when I decided to do a full rebuild of the solution, and that worked for me.
So I guess the lesson to be learned is "before smashing your head against the wall, try a full rebuild".
Related videos on Youtube
balexandre
Father (x3), Husband (x1), Dedicated, Friendly. Web, Windows and Mobile developer (mostly .NET and NodeJs). Photographer by hobby, Windsurfer by passion. Born in Portugal (in 1977),happily married to a beautiful Romanian gal (since 2005) and living in Denmark (since 2006) 😊 P.S. My Simpson character was designed by a Fiverr.com user.
Updated on September 09, 2020Comments
-
balexandre over 3 years
As you can notice
Symbols are been correctly loaded.
I just created a view
GetCompanies.cshtml
using theAddView
shortlinkBut, no matter what I do, I can't debug in the View.
What I did so far:
- Close and Open Solution
- Close and open Visual Studio
- Shutdown all ASP.NET Development Server's
- Deleted all Symbol Libraries
.pdb
- Clean Solution
- Re-Build Solution
did not (yet) shutdown Windows 7 x64 :-/
-
burhop over 11 yearsDid a bit more checking... it seems if Visual studio guesses the wrong runtime, you may not be able to debug. Here is the solution: blogs.msdn.com/b/greggm/archive/2010/06/08/…
-
strider about 11 yearsThanks @user1834226. You comment above is what it turned out to be the problem in my case. I was debugging the app in Release mode and my breakpoint in the library project was not hitting.
-
Mike almost 7 yearsChanging the target framework is a huge hassle and rarely an option.