调试.NET Framework的源代码仅在Visual Studio 2010中显示反汇编 [英] Debug .NET Framework's source code only shows disassembly in Visual Studio 2010

查看:212
本文介绍了调试.NET Framework的源代码仅在Visual Studio 2010中显示反汇编的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2010 来调试.NET Framework的源代码专业的。我遵循 Raj Kaimal 的帖子,但是我必须做错事,因为唯一的代码是反汇编代码:

I'm trying to debug .NET Framework's source code using Visual Studio 2010 Professional. I followed the steps described in Raj Kaimal's post, but I must be doing something wrong since the only code I'm getting to see is the disassembly code:

Alt text http://jdecuyper.github .com / images / SO / vs2010DebugFramework.jpg

如图所示,转到源代码和加载符号选项被禁用。然而,符号是从Microsoft的服务器下载的,因为我可以在本地缓存目录中看到它们。

As you can see in the image, the Go to Source Code and the Load Symbols options are disabled. Nevertheless, symbols are downloaded from Microsoft's server since I can see them inside the local cache directory.

我正在调试的代码如下:

The code I'm debugging goes as follow:

var wr = WebRequest.Create("http://www.google.com");
Console.WriteLine("Web request created");
var req = wr.GetRequestStream();
Console.Read();

当我点击 F11 进入第一行代码时,窗口弹出我们在我的机器上不存在的f:\dd\\\
dp\fx\src\Net\System\Net\WebRequest.cs内的WebRequst.cs文件

When I hit F11 to step into the first line of code, a window pops us looking for the "WebRequst.cs" file inside "f:\dd\ndp\fx\src\Net\System\Net\WebRequest.cs" which does not exists on my machine.

我缺少什么?

推荐答案

在项目属性中,目标.NET Framework 4.0。当我编译.NET 3.5时,我遇到了同样的问题。

In project properties, target .NET Framework 4.0. I had the same issue when I was compiling for .NET 3.5.

这篇关于调试.NET Framework的源代码仅在Visual Studio 2010中显示反汇编的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆