Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 892
Alexander Zaldostanov Avatar asked Aug 01 '14 14:08

Alexander Zaldostanov


People also ask

What getch () does in C?

getch() method pauses the Output Console until a key is pressed. It does not use any buffer to store the input character. The entered character is immediately returned without waiting for the enter key.

How do you get the Press any key to continue?

Use getch() : printf("Let the Battle Begin!\ n"); printf("Press Any Key to Continue\n"); getch();

Does AC program start at the beginning?

Main() function: It is the starting point of all the C programs. The execution of C source code begins with this function.


3 Answers

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

like image 103
Hiệp Lê Avatar answered Oct 17 '22 17:10

Hiệp Lê


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

like image 34
Jamie Clayton Avatar answered Oct 17 '22 17:10

Jamie Clayton


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.

like image 1
Ramesh Gupta Avatar answered Oct 17 '22 19:10

Ramesh Gupta