In .NET, essentially, there are no DLLs or non-DLLs, there are just assemblies and modules. Modules are real artifacts created as a result of the build, they are PE files:
http://en.wikipedia.org/wiki/Portable_Executable[
^].
And .EXE or .DLL is no more then the part of the names. When you use application type "Object Library", the .DLL file is created, otherwise it is an .EXE file, which must have an entry point (
Main
). That's basically all. The .EXE file can be used exactly as a .DLL: referenced by other assemblies or loaded during run-time. The library is just the assembly without the entry point, not more not less.
To set this application type with Visual Studio, see project properties, very first tab ("Application"). The bare C# compiler has appropriate command-line options; run it to see.
—SA