Resharper F12下载dll源码 Visual Studio(VS) F12 查看DLL源代码

原作者:赵青青

原文链接:Visual Studio(VS) F12 查看DLL源代码

Dot Peek

今天在调试时,又有这个需求,想查看dll的源代码,我决定从dot peek这个程序入手去查找相关的资料

dot peek官网:https://www.jetbrains.com/decompiler/

从官网的简介来看它可以反编译.net 的dll,pdb为源代码,并能生成解决方案,但没有很明显介绍这货如何和vs紧密的结合起来,达到我需要的F12查看dll的源码

经过搜索,查找到这篇文章,豁然开朗:https://knowledge.zomers.eu/visualstudio/Pages/How-to-enable-the-decompiler-in-ReSharper-for-Visual-Studio.aspx

使用方法

resharper官网:https://www.jetbrains.com/resharper/

1、安装好Visual Studio,和Resharper(默认会勾选安装Dot peek)

2、打开VS,在菜单栏 选择 Resharper – Options ,打开Options窗口

3、在左侧列表中,选择 External Sources,勾选 Navigation to Sources – Decompile methods ,点击 Save

image

4、在第一次按下F12时,会弹出用户使用协议,选择接受就可。

如果这个dll在本地不存在,第一次按F12时,会联网从远程下载。

每当你按下F12时,就可以跳到dll中查看具体的代码实现啦。在每个类的头部,可以发现这么一段注释:

// Decompiled with JetBrains decompiler
// Type: TableML.TableFile
// Assembly: TableML, Version=0.7.6285.31046, Culture=neutral, PublicKeyToken=null
// MVID: E539F3DE-C53C-4567-99E9-7697E4765856
// Assembly location: D:\Git\xxx\TableML\TableML.dll

我的环境

说明:resharper 收费,dotpeek 免费

visual studio 2017 +  resharp 2017.1

visual studio 2015 + resharp 10.1

今天在调试时,又有这个需求,想查看dll的源代码,我决定从dot peek这个程序入手去查找相关的资料

dot peek官网:https://www.jetbrains.com/decompiler/

从官网的简介来看它可以反编译.net 的dll,pdb为源代码,并能生成解决方案,但没有很明显介绍这货如何和vs紧密的结合起来,达到我需要的F12查看dll的源码

经过搜索,查找到这篇文章,豁然开朗:https://knowledge.zomers.eu/visualstudio/Pages/How-to-enable-the-decompiler-in-ReSharper-for-Visual-Studio.aspx

使用方法

resharper官网:https://www.jetbrains.com/resharper/

1、安装好Visual Studio,和Resharper(默认会勾选安装Dot peek)

2、打开VS,在菜单栏 选择 Resharper – Options ,打开Options窗口

3、在左侧列表中,选择 External Sources,勾选 Navigation to Sources – Decompile methods ,点击 Save

image

4、在第一次按下F12时,会弹出用户使用协议,选择接受就可。

如果这个dll在本地不存在,第一次按F12时,会联网从远程下载。

每当你按下F12时,就可以跳到dll中查看具体的代码实现啦。在每个类的头部,可以发现这么一段注释:

// Decompiled with JetBrains decompiler
// Type: TableML.TableFile
// Assembly: TableML, Version=0.7.6285.31046, Culture=neutral, PublicKeyToken=null
// MVID: E539F3DE-C53C-4567-99E9-7697E4765856
// Assembly location: D:\Git\xxx\TableML\TableML.dll

我的环境

说明:resharper 收费,dotpeek 免费

visual studio 2017 +  resharp 2017.1

visual studio 2015 + resharp 10.1

猜你喜欢

转载自www.cnblogs.com/bro-ma/p/10545271.html
f12
今日推荐