Fog Creek Software
g
Discussion Board




.NET and classic file extensions

Why did Microsoft decide to give .NET libraries and `executables' .dll and .exe extensions (respectively)? This move makes very little sense as these are neither .exe or .dlls (in the binary standards sense), and leads to the sort of issue that Joel mentioned. BTW: If you want to see something that looks, acts, and smells like a hack, run some of the sysinternal tracing tools to see how the .NET extensions intercept virtually every file call to determine if it's .NET related -- _horribly_ inelegant. How about *.net and associate it just like any other application?

Dennis Forbes
Wednesday, January 28, 2004

What happens if you're a user who has come to learn that .exe files are programs that you can double-click to start and .dll files are libraries that you really shouldn't delete?

John Topley (www.johntopley.com)
Thursday, January 29, 2004

They *are* standard exe and dll files, at least to my understanding.

The exe file has code that (in pseudo C) looks something like this:

int main(int arc, char **argv)
{
  return call_into_mscorlib(this_file);
}

And the .dll version is pretty much the same

BOOL DllMain(/*whatever crap goes here*/)
{
  return call_into_mscorlib_dll(this_file);
}

At least that's how it's been explained by Microsoft employees on their blogs. It gets quite complicated when you compile something with a mix of managed and unmanaged code (like you can do with MSVC++) though.

Sum Dum Gai
Thursday, January 29, 2004

It wouldn't be any different than VFP or VB dll or EXE that relies on the appropriate runtime. Exactly as the previous poster said.

Chris Ormerod
Thursday, January 29, 2004

"What happens if you're a user who has come to learn that .exe files are programs that you can double-click to start and .dll files are libraries that you really shouldn't delete?"

What happens when you're a user that has been taught that EXEs should never be accepted or launched from online, and someone tells you to run http://blahblah/something.exe? Given that .NET offers an entirely new security infrastructure that can be used, in a java fashion, to sandbox applications, it seems like they grabbed defeat from the hands of victory using legacy extensions.

Dennis Forbes
Thursday, January 29, 2004

I think both points are valid. It's a difficult one.

John Topley (www.johntopley.com)
Thursday, January 29, 2004

*  Recent Topics

*  Fog Creek Home