Alexander Zaldostanov
Alexander Zaldostanov

Reputation: 3011

After pressing Start in C# I am getting Source Not found Error at the beginning

I am facing very strange problem in Visual Studio C#, when I Press Start or {F5} key for running my Database application, I am getting "Source not available" error and

"Source information is missing from the debug information for this module" "You can view disassembly in the Disassembly window. To always view disassebly for missing source file, change the setting in the Option dialog."

I did the clean of solution, then rebuild it but still it persists , I am enclosing the picture and debug >> call stack window, If somebody has encountered this sort of issue I would deeply appreciate their help.

For your reference:

This is purely a database project, where I am using Visual Studio C#.net and MS SQL Server 2008R2, Nothing else.

I know it happens Usually when there are debug problems, missing information after building and etc

if you zoom in really close you will see that we are looking at mscorlib, and I really dont know how to handle such sort of errors,

Thanks,

enter image description here

Upvotes: 13

Views: 8748

Answers (5)

Ramesh Gupta
Ramesh Gupta

Reputation: 1

This is a .pdb issue.

Just go to Debug -> Options -> Debugging -> Symbols -> Checked the Microsoft Symbol Servers and click Load all symbols

That 'll load the all .pdb files or symbol with your project.

Upvotes: 0

Hiệp Lê
Hiệp Lê

Reputation: 634

The Source Not Available is not the problem. It only tells the code that throw exception is not available because it is in mscorlib.

You should open the project properties, go to Web tab and check if there is any missing value there. Did you see asp.net checkbox checked? etc

Other issue might come from platform target, output path etc...

Upvotes: 3

ataurrehman
ataurrehman

Reputation: 129

Sometimes using third party libraries with incompatible version gives this error. It really means that whatever was expected was not there in its physical place. For example you just add a reference to the dll file of AJAX control toolkit and relocated dll file to another place. Relocating libraries to other place will not cause compile time error but it will produce run time error what you are getting now in your case. Try mapping this concept to your case. And don't worry it's not .Net framework's bug. It is just a configuration error. Configure your third party libraries correctly.

Upvotes: 0

Jamie Clayton
Jamie Clayton

Reputation: 1017

I might be off track, but I would want to review the Visual Studio Tools -> Options -> Debugging settings to ensure that you are trying to debug the appropriate code. The options are different depending on the version of Visual studio that you are running.

I would review the symbols section and "Just My Code" options just to confirm they are appropriate.

While your screenshots show VS trying to find Microsoft Assembly source code references, if your application is using other nugget libraries or in house libraries compiled and used in your solution and the path used to compile them is different. Aka. someone else's working directory is different to yours, VS will prompt you to try and find the location on your workstation. I've found this happens when you change PC's, adjust workstation working directories or migrate to new editions of Source control provider (TFS etc).

Upvotes: 6

T_D
T_D

Reputation: 1728

It seems the problem isn't new, see here and here. The two possible solutions mentioned there are

  • Cleaning the solution (Build > Clean Solution)

  • For ClickOnce applications: Enable clickonce security settings checkbox in the security tab of the application properties (Projects Tab -> "Project Name" Properties-> Security Tab)

Upvotes: 0

Related Questions