Visual Studio (VS) F12 to view the DLL source code, studiof12

Source: Internet
Author: User

Visual Studio (VS) F12 to view the DLL source code, studiof12
Preface

When I debug a function in VS, I suddenly wondered "can I use VS F12 (to definition) to view the implementation of the current function in this dll (source code ), instead of seeing function names and parameters as the VS built-in function does?"

In retrospect, when installing Resharp, I noticed that Resharp checked by default.Dot PeekAfter installing Resharp on the home computer, press 12 and you will find that there is an option to customize F12. I chose Resharxxxx, afterwards, I was pleasantly surprised to find that F12 could navigate to the DLL source code. However, due to system reinstallation, I couldn't remember what special settings were made.

 

Dot Peek

Today, when debugging, I had this requirement. To view the dll source code, I decided to start with the dot peek program to find relevant information.

Dot peek Official Website: https://www.jetbrains.com/decompiler/

From the official website introduction, it can be decompiled. net dll, pdb is the source code, and can generate a solution, but it does not clearly introduce how this product is closely integrated with vs, to achieve the F12 I need to view the dll source code

Search, find this article, suddenly open: https://knowledge.zomers.eu/visualstudio/Pages/How-to-enable-the-decompiler-in-ReSharper-for-Visual-Studio.aspx

 

Usage

Resharper Official Website: https://www.jetbrains.com/resharper/

1. InstallVisual Studio, AndResharper(Installation is checked by default.Dot peek)

2. Open VS and selectResharper-Options, Open the Options window

3. In the list on the left, selectExternal Sources, SelectNavigation to Sources-Decompile methods, ClickSave

4. When you press F12 for the first time, the user agreement will pop up and you can choose to accept it.

Appendix

If this dll does not exist locally, the first time you press F12, it will be remotely downloaded from the Internet.

 

Every time you press F12, you can jump to the dll to view the specific code implementation. In the header of each class, you can find such a comment:

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

 

My Environment

Note: resharper and dotpeek are free.

Visual studio 2017 + resharp 2017.1

Visual studio 2015 + resharp 10.1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.