VS 2008 breakpoint will not currently be hit. No symbols have been loaded for this document

This may be an old question, but I wanted to answer it after I found a solution for this very problem because it was one of the most complete questions asked in regards to this topic.

Intro

My project is an ASP.NET application, but the base problem will happen on WinForms as well. The problem arises when a DLL is missing from the assemblies output. However, this same exception occurs if the DLL you are referencing then references another DLL that is not in the assemblies. Due to the way the operating system loads DLLs, the referenced DLL must be in the environment path, and not in your output assemblies.

Project A references DLL D.
DLL D references DLL X.
DLL D may be in your output assemblies.
DLL X must be in your environment path.

The core cause to this problem is in the way the operating system loads native DLL’s at >runtime. Native DLL’s are loaded using the following logic which does not include the >Temporary ASP.net Files nor the applications /bin folder. This problem will also occur in >any .Net application if the Native DLL is not included in the /bin folder with the .EXE >file or if the DLL is not in the Path Environment Variable.

Personal Solution

I was using a DLL called DivaAPIWrapper.dll (Managed DLL for C#). I knew, however, that DivaAPIWrapper.dll needed DivaAPI.dll (Unmanaged C++) to operate. I placed DivaAPI.dll in all my output paths but I kept receiving this error. Only after I placed DivaAPI.dll in my environment path (C:\windows\Microsoft.Net\Framework\v2.0.50727) did it work. Please note: your path may be different if you’re using a newer version of the .NET framework!

Complete Solution by Jerry Orman

See Link Here: http://blogs.msdn.com/b/jorman/archive/2007/08/31/loading-c-assemblies-in-asp-net.aspx

Leave a Comment