.NET DEBUGGING
OOPSOOADSOLIDDPDSSQLXMLFAQ
Module 10 - Understanding .NET
.NET
Development Platform to Develop and Deploy Softwares
For Instance .NET Framework, Mono etc.
Windows-Only
.NET FrameworkApplication + Application Extension + File + Folder
*.exe : Application

*.dll : Application Extension

*.config, *.xml etc. : File

assembly, Framework64 etc. : Folder
Integral Part of Many Applications Running on Windows
.NET Framework
Programs and Libraries to Build and Run Applications
Included and Installed with Windows OS
Folder
.NET FX 4.x
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319
*.exe, *.dll, *.config, *.xml, 1033, Config etc. : File + Folder
To Open Folder Location, RUN@ %systemroot%\Microsoft.NET
Compiler
Translate Source Code into IL Code and Generate Metadata
C# Command Line Compiler
Application
csc.exe
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
Input and Output Files, Code Generation etc. : Option
To Display Usage Message, CMD@ csc.exe /help
Assembler
Translate Source Code into IL Code and Generate Metadata
.NET Framework IL Assembler
Application
ilasm.exe
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe
Input and Output Files, Code Generation etc. : Option
To Display Usage Message, CMD@ ilasm.exe /?
Microsoft Build
Orchestrate and Build Solution and Project
MS Build
Application
msbuild.exe
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe
Input and Output Files, Code Generation etc. : Option
To Display Usage Message, CMD@ msbuild.exe /help
Compiler Configuration File
Configuration Settings of Compiler
XML File Format
File
csc.exe.config
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe.config
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe.config
Use csc.exe.config : Default Setting
Configuration Settings like startup, supportedRuntime etc.
Assembler Configuration File
Configuration Settings of Assembler
XML File Format
File
ilasm.exe.config
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe.config
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe.config
Use ilasm.exe.config : Default Setting
Configuration Settings like startup, requiredRuntime etc.
Microsoft Build Configuration File
Configuration Settings of MSBuild
XML File Format
File
msbuild.exe.config
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe.config
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe.config
Use msbuild.exe.config : Default Setting
Configuration Settings like startup, supportedRuntime, assemblyBinding etc.
Compiler Message
Messages for Syntax Errors, Unusual Conditions etc.
C# Compiler Error / Warning Messages
Application Extension
cscui.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\1033\cscui.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\1033\cscui.dll
Report Errors and Warnings : Default Setting
To Report all Warnings as Errors, CMD@ csc.exe /warnaserror+
Compiler Response File
Command Line Options of Compiler
Text File Format
File
csc.rsp
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.rsp
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.rsp
Include csc.rsp : Default Setting
To Exclude csc.rsp File, CMD@ csc.exe /noconfig
Application Manifest File
Name, Version, Security etc. of Assembly
XML File Format
File
default.win32manifest
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\default.win32manifest
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\default.win32manifest
Include default.win32manifest : Default Setting
To Exclude default.win32manifest File, CMD@ csc.exe /nowin32manifest
Base Class Library
Core and Base Types / Operations
Framework Standard Library
Application Extension
mscorlib.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll
Reference mscorlib.dll : Default Setting
To Ignore mscorlib.dll Library, CMD@ csc.exe /nostdlib+
Framework Class Library
Standard and Specialized Types / Operations
Framework Common Library
Application Extension
*.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Data.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Data.Linq.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.IO.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Windows.Forms.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Web.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.XML.dll
...
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.Linq.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.IO.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Windows.Forms.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Web.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.XML.dll
...
Reference via csc.rsp : Default Setting
To Reference Library, CMD@ csc.exe /reference
Linker
Link IL Code and Metadata into PE
Portable Executable File Generator
Application Extension
mscorpehost.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorpehost.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorpehost.dll
Build .exe : Default Setting
To Specify the Build Type, CMD@ csc.exe /target
Debug Information
Read and Write Symbol into PDB
Debug Interface Access Based SymReader
Application Extension
diasymreader.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll
No Debug Information : Default Setting
To Emit Debugging Information, CMD@ csc.exe /debug+
Execution Engine
Initialize CLR Virtual Machine
.NET Runtime Execution Engine
Application Extension
mscoreei.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
Shell Implementation : API
To Dump Version of Common Language Runtime, DBG@ !SOS.EEVersion
Common Language Runtime
Services for Managed Code Execution
CLR Workstation
Application Extension
clr.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Clr : API
To Break on CLR Module Load, DBG@ sxe ld clr
Machine Configuration File
Configuration Settings of CLR
XML File Format
File
machine.config
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
Use machine.config : Default Setting
Configuration Settings like configSections, configProtectedData etc.
Global Assembly Cache
Machine-Wide Shared Assembly Cache
Global Assembly Cache Directory
Folder
GAC_32 / GAC_64
x86 C:\Windows\Microsoft.NET\assembly\GAC_32
x64 C:\Windows\Microsoft.NET\assembly\GAC_64
*.dll etc. : File
To Open Folder Location, RUN@ %systemroot%\Microsoft.NET\assembly
Just In Time Compiler
Translate IL Code to Native Code
Just In Time Compiler
Application Extension
clrjit.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll
Clr Jit : API
To Break on JIT Module Load, DBG@ sxe ld clrjit
Son Of Strike
Commands for Managed Code Debugging
Managed Debugging Extension
Application Extension
SOS.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\SOS.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SOS.dll
Clr Debugging : API
To Load SOS Debugging Extension, DBG@ .loadby SOS clr
Data Access Component
Tasks for CLR Debugging
External Data Access Support
Application Extension
mscordacwks.dll
x86 C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscordacwks.dll
x64 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscordacwks.dll
Clr Data Access : API
To Control CLR Debugging, DBG@ .cordll -ve -u -l
API
Application Programming Interface

ASM
Assembler

C#
C Sharp

CLR
Common Language Runtime

CONFIG
Configuration

COR
Common Object Runtime

CSC
C Sharp Compiler

DAC
Data Access Component

DIA
Debug Interface Access

DLL
Dynamic Link Library

EE
Execution Engine

EXE
Executable

FX
Framework

GAC
Global Assembly Cache

IL
Intermediate Language

IO
Input Output

JIT
Just In Time

LD
Load

LIB
Library

LINQ
Language Integrated Query

MS
Microsoft

OS
Operating System

PDB
Program Database

PE
Portable Executable

RSP
Response

SOS
Son Of Strike

SXE
Set Exception Enabled

SYM
Symbol

STD
Standard

UI
User Interface

WIN
Windows

WKS
Workstation

XML
Extensible Markup Language

x86
32-Bit CPU Architecture

x64
64-Bit CPU Architecture