"No symbols have been loaded for this document." But they have!

39,138

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".

Share:
39,138

Related videos on Youtube

balexandre
Author by

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, 2020

Comments

  • balexandre
    balexandre over 3 years

    As you can notice

    enter image description here

    Symbols are been correctly loaded.

    I just created a view GetCompanies.cshtml using the AddView shortlink

    enter image description here

    But, 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
    burhop over 11 years
    Did 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
    strider about 11 years
    Thanks @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
    Mike almost 7 years
    Changing the target framework is a huge hassle and rarely an option.

Related