Nope, .NET has
no such thing as "static" builds.
The EXE files (assemblies) produced by .NET have a
minimal ("fake") PE header that launches the .NET runtime (entry point
_CorExeMain
in
mscoree.dll
), whereas the
actual program code is stored as CIL (Common Intermediate Language) code, similar to Java's bytecode.
The CIL code will be interpreted (or JIT-compiled) by the CLR (Common Language Runtime), similar to Java's JVM (Java Virtual Machine).
Also note that CIL byte code can be converted back to source code quite easily, for example with
ILSpy:
https://github.com/icsharpcode/ILSpy
So, if you publish your .NET-based application as "compiled" EXE (or DLL) files, do
not expect that this will "hide" your source code 😏
There are "obfuscators" that can make de-compiling your .NET application harder, though:
https://www.eziriz.com/dotnet_reactor.htm
MS used to have the Dependency Walker app for this, but sadly it hasn't been updated in years. There is a non-MS rewrite and update available, Dependencies.
https://github.com/lucasg/Dependencies
There are x86 and x64 versions of the app available. |
...neither of which helps with .NET assemblies though, because they only look at the "fake" PE header,
not at the actual CIL code.
There are some tools similar to "Dependency Walker" for .NET assemblies:
*
https://www.workshell.co.uk/products/netdepends/
*
https://github.com/dandrejvv/AssemblyInformation