DotNet, C sharp
.Net:
library
XML Web Services and Web Forms (ASP.Net)
Windows Forms
Common Language Runtime (VM)
languages
C#
VB
Convert VB.Net to C#:
.NET Framework:
ASP.NET MVC (and WebForms, but not Core):
ASP.NET Core:
Debug
Windows application: Event Viewer
dnSpy/dnSpy: .NET debugger and assembly editor - debug process, assembly browser
breakpoint:
start dnSpy as admin
menu "Debug" -> "Attach to process"
select
w3wp.exe
menu "Debug" -> "Windows" -> "Modules" to see all loaded assemblies
if local variables didn't show (JIT optimization):
by updating assembly attributes: hacktricks/reversing.md at master · carlospolop/hacktricks - Reversing - HackTricks
For ASP.Net, set
configuration/system.web/compilation/@debug
totrue
(Web.config
) to disable execution optimizations (see also@optimizeCompilations
, set tofalse
) (only for generated code?)by use ini file or registry:
set the environment variable
COMPLUS_ZAPDISABLE=1
or the registry keyHKLM\SOFTWARE\Microsoft\.NETFramework\ZapDisable
For ASP.Net, set
system.web/hostingEnvironment/@shadowCopyBinAssemblies
tofalse
(Web.config
) to disable shadow copies of DLLs (in a tmp dir)For the DLL
somelib.dll
create asomelib.ini
with:fgreinacher/nooptimize: A tiny command line tool that allows you to disable JIT optimization for a given set of .NET assemblies. - Create a ini file for all assemblies
ProcDump - Windows Sysinternals | Microsoft Docs - generate process dump
WinDbg - load process dump
Decompiler
dotPeek: Free .NET Decompiler & Assembly Browser by JetBrains Download dotPeek: Free .NET Decompiler by JetBrains Wine: need dotnet45 + Windows NT 6.0+ (Vista+)
Attributes
Compilation
Language version
Documentation comments
Sync and async
Dependecy injection
Guidelines
Follow Microsoft coding style:
Framework Design Guidelines | Microsoft Learn - Naming, type and member design, etc.
See also:
Last updated