DotNet, C sharp
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
.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:
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: -
For ASP.Net, set configuration/system.web/compilation/@debug
to true
(Web.config
) to disable execution optimizations (see also @optimizeCompilations
- generate process dump
WinDbg - load process dump
dotPeek: Free .NET Decompiler & Assembly Browser by JetBrains Download dotPeek: Free .NET Decompiler by JetBrains Wine: need dotnet45 + Windows NT 6.0+ (Vista+)
Follow Microsoft coding style:
Framework Design Guidelines | Microsoft Learn - Naming, type and member design, etc.
See also:
false
by use ini file or registry:
set the environment variable COMPLUS_ZAPDISABLE=1
or the registry key HKLM\SOFTWARE\Microsoft\.NETFramework\ZapDisable
For ASP.Net, set system.web/hostingEnvironment/@shadowCopyBinAssemblies
to false
(Web.config
) to disable shadow copies of DLLs (in a tmp dir)
For the DLL somelib.dll
create a somelib.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
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default |
DebuggableAttribute.DebuggingModes.DisableOptimizations |
DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints |
DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0