[英]How to include source instead of a library in C# / Visual Studio?
I come from a long Java background and very new to C#. 我来自很长的Java背景,对C#来说很新。 I was trying to run one of the starter kit applications from Windows phone and I am getting this error. 我试图从Windows手机运行一个入门套件应用程序 ,我收到此错误。
A first chance exception of type 'Newtonsoft.Json.JsonReaderException' occurred in Newtonsoft.Json.WindowsPhone.dll
I am finding it hard to debug this because I am directly referring to the dll file under References pointing to Newtonsoft.Json.WindowsPhone. 我发现很难调试这个,因为我直接引用了References指向Newtonsoft.Json.WindowsPhone的dll文件。 In Java, I would have searched for the library and downloaded the source to step into the exact location during debugging. 在Java中,我会搜索库并下载源以在调试期间进入确切的位置。
If that is possible, how would I do it in C# (as in how would i refer the library source for my project to pick up at run-time)? 如果可能,我将如何在C#中执行此操作(如何在运行时将库项源引用到我的项目中)? I am using the Visual studio 2010 Express Edition as the IDE. 我使用Visual Studio 2010 Express Edition作为IDE。
Once you have stopped your program in the debugger, you can use the modules window to load the symbols for Json.NET. 在调试器中停止程序后,可以使用模块窗口加载Json.NET的符号。 Obviously, you need to have the symbols on your machine so you can browse to them. 显然,您需要在计算机上放置符号,以便浏览它们。
Failing that, you can switch to a project reference and include Json.NET in your solution as Dan suggested. 如果不这样做,您可以切换到项目参考,并在Dan建议的解决方案中包含Json.NET。
The easiest way is to download their latest build then inside visual studio right click your solution and under add menu select existing project point to project file of the library and click open button. 最简单的方法是在Visual Studio中下载最新版本,然后右键单击您的解决方案,在添加菜单下选择现有项目指向库的项目文件,然后单击打开按钮。 after that u will be able to set brakepoint wherever u want. 之后,你可以在任何你想要的地方设置刹车点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.