by junon · 3y ago · 0 comments
Just a fun anecdote. I don't know if this is the case anymore.
You can think of this like a source map, but only files and line numbers.
Production binaries of course doesn’t embed any source or debugging symbols.
It’s like erroneously shipping source maps files into your front end production build. It shouldn’t happen and it’s not necessary, but it’s just one configuration variable away so it happens a lot.
I don't know the truth of the original statement, but it isn't too unbelievable.
It has always been trivial to load an assembly in something like dnSpy or another IL Disassembler and generate C# code and patch .NET assemblies. At least in the versions < 5.
https://learn.microsoft.com/en-us/dotnet/standard/assembly/f...
But your original post especially doesn't make sense because the default Debug configuration has always put the debug symbols in a separate PDB file. So even if you were arguing that early C# developers didn't understand how to use their tools, they wouldn't have had the source embedded in the EXE.
I do recall good old Visual Basic did this though, as it ran interpreted. The executable it generated was just a small loader with the source code appended.