I am debugging this code and getting a strange "source not found" page that is looking for this class called ExecutionContext.cs when the debugger lands on the Jtoken line.
ExecutionContext.cs
not found.
You need to find theExecutionContext.cs
to view the source for the current call stack frame.
(see below for additional info)
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using RestSharp;
IRestResponse content = myApi.GetSomething();
JToken token = JObject.Parse(content.ToString());
MyClass myclass = token.ToObject<Myclass>();
I've also tried replacing Jtoken with dynamic or var and same result. I've googled it and there is nothing but the MS documentation which was not helpful in fixing.
Any suggestions on how to get this to execute or at least throw a normal exception I can fix?
Thanks
Locating source for 'f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs'. (No checksum.) The file 'f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs' does not exist.
Looking in script documents for 'f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs'...
Looking in the projects for 'f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs'. The file was not found in a project. Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cvt\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\msclr\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\sys\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\thr\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\amd64\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\arm\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\concrt\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\i386\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\linkopts\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\stl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\vccorlib\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\crt\src\vcruntime\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\src\mfc\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\src\atl\'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include\'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs.
The debugger could not locate the source file 'f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs'.
A debug setting had been changed somehow and enabling the Just My Code setting returned it back to normal managed exception throwing. To do so, go to
Debug > Options... > Debugging > General > Enable Just My Code