Reflector and its add-in FileDisassembler.
Reflector will allow to see the source code. FileDisassembler will allow you to convert it into a VS solution.
Answer from GEOCHET on Stack OverflowVideos
Hello. A few weeks ago i got a software witch was compatible with VSC and it worked pretty good when you opened it, it decompile the files and you got them in visual. The thing is that I lost this software and i've been looking for it for a few days. Idk if any of you know this software or other that could help me do the decompilation.
Reflector and its add-in FileDisassembler.
Reflector will allow to see the source code. FileDisassembler will allow you to convert it into a VS solution.
When Red Gate said there would no longer be a free version of .Net Reflector, I started using ILSpy and Telerik's JustDecompile. I have found ILSpy to decompile more accurately than JustDecompile (which is still in Beta). Red Gate has changed their decision and still have a free version of .Net Reflector, but now I like ILSpy.
From the ILSpy website (https://github.com/icsharpcode/ILSpy/):
ILSpy is the open-source .NET assembly browser and decompiler.
ILSpy Features
- Assembly browsing
- IL Disassembly
- Decompilation to C#
- Supports lambdas and 'yield return'
- Shows XML documentation
- Saving of resources
- Search for types/methods/properties (substring)
- Hyperlink-based type/method/property navigation
- Base/Derived types navigation
- Navigation history
- BAML to XAML decompiler
- Save Assembly as C# Project
- Find usage of field/method
- Extensible via plugins (MEF)
Update:
April 15, 2012, ILSpy 2.0 was released. New features compared with version 1.0:
- Assembly Lists
- Support for decompiling Expression trees
- Support for lifted operatores on nullables
- Decompile to Visual Basic
- Search for multiple strings separated by space (searching for "Assembly manager" in ILSpy.exe would find AssemblyListManager)
- Clicking on a local variable will highlight all other occurrences of that variable
- Ctrl+F can be used to search within the decompiled code view
Update:
- ILSpy 2.1 supports async/await decompilation
Here is a good article about Reflector and how to integrate Reflector into Visual Studio.
Of particular interest is the Reflector.VisualStudio Add-In. This add-in, created by Jaime Cansdale, allows for Reflector to be hosted within Visual Studio. With this add-in, you can have Reflector integrated within the Visual Studio environment.
To get started, you will need to have the latest version of Reflector on your machine. Once you have downloaded Reflector, download the latest version of the Reflector.VisualStudio Add-In from http://www.testdriven.NET/reflector. The download contains a number of files that need to be placed in the same directory as Reflector.exe. To install the add-in, drop to the command line and run:Reflector.VisualStudio.exe /installAfter the add-in has been installed, you can start using Reflector from Visual Studio. Youโll notice a new menu item, Addins, which has a menu option titled Reflector. This option, when selected, displays the Reflector window, which can be docked in the IDE. Additionally, the add-in provides context menu support.
When you right-click in an open code file in Visual Studio, youโll see a Reflector menu item that expands into a submenu with options to disassemble the code into C# or Visual Basic, display the call graph or callee graph, and other related choices. The context menu also includes a Synchronize with Reflector menu item that, when clicked, syncs the object browser tree in the Reflector window with the current code file.
Try the open-source software http://ilspy.net/
So you see at the top where it lists .Ref at the end of the package name? I'm not positive but I suspect this is trimmed down version of the DLL that doesn't include the full source.
If you search for the dll elsewhere you should be able to find the dll with the full source and decompile that with a standalone decompiler.
So for your example you can find the full dll at C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App\3.0.0\Microsoft.AspNetCore.Authentication.Cookies.dll
Personally I prefer using the free decompiler offered by JetBrains called dotPeek. It allows you to navigate directly to the decompiled source using F12, however this will only lead you back to where you are stuck now. BUT if you open the path I listed above for the full DLL and open that in dotPeek, you'll get the full decompiled source code.
As far as I know there's no way to lookup the actual DLL via keyboard shortcut inside the IDE, you have to find the DLL yourself and open it in a decompiler.
I have a partial solution for this. It's partial because still the Go to Definition (F12) won't work for it, but the Step Into (F11) option while debugging can successfully step into the actual .NET Core, not just the stub. The feature is called Source Link, I hope it helps.