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

5

13

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

Gefell answered 1/8, 2014 at 14:43 Comment(7)
Have you tried turning it off and on again? That is, have you restarted Visual Studio?Pilgrim
Yes I did that :) Still its showing me the same freaky dis-assembly errorGefell
What are you expecting to run, if it's just a Database Project? In your screenshot, I'm seeing a few tabs with files which seem to indicate a non-database project is present. I'd check your Start Up Project has been set correctly for your solution.Hambley
I have used the connection string and datasets to access the sql server, but after pressing {F5} still getting the same error Mike , No change, I have wasted almost for 2 days on this stuffGefell
Are you creating and starting a separate thread? I see a ThreadStart in the call stack, which is why I ask. Try putting a breakpoint wherever the thread you're creating is being created and check for null references. You can also try turning off .NET source stepping. Tools->Options->debugging->[check] enable just my code, [uncheck] .NET framework source steppingWyatt
This is where I am getting the error Public virtual ObjectHandle CreateInstance (ActivationContext activationContext, string[] activationCustomData) { if (activationContext == null) throw new ArgumentNullException("activationContext"); Contract.EndContractBlock(); if (CmsUtils.CompareIdentities(AppDomain.CurrentDomain.ActivationContext, activationContext)) { ManifestRunner runner = new ManifestRunner(AppDomain.CurrentDomain, activationContext); return new ObjectHandle(runner.ExecuteAsAssembly()); }Gefell
Enable just my code will work for this scenarioSinglecross
H
6

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

Hills answered 8/8, 2014 at 0:9 Comment(0)
M
3

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

Manta answered 12/8, 2014 at 10:29 Comment(0)
P
0

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.

Peculiarity answered 1/8, 2014 at 14:43 Comment(0)
C
0

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)

Clatter answered 6/8, 2014 at 9:33 Comment(0)
T
0

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.

Todtoday answered 9/10, 2017 at 12:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.