Naming the main assembly (.exe) to avoid a long file name: Company.Product.Application.exe

Background

When creating shared class libraries, I mirror the Microsoft .NET Framework name structure, replacing it Systemwith my own company name - i.e. Tek4.Net.NetworkWidget.

For assembly specific products, I use something like Tek4.ProductName.IO.FileWriter.

Print too large .exe file names !!! Company.Product.SuperApp.exe

Visual Studio uses the fully qualified assembly name for the output files; this works great for a DLL, but too much for a console application - i.e.Tek4.Utils.ConsoleApp.exe

Solution 1: (NOT PREFERRED)

Hierarchical names for the main executable assemblies:

  • Build Name: ConsoleApp
  • EXE file name: ConsoleApp.exe

This solution means that your delivered .exe files will contain only a simple assembly name that cannot identify itself well and is much more prone to name conflicts with other assemblies. Stack traces, .NET Reflector, etc. Will only be displayed ConsoleAppinstead of the full assembly name.

Solution 2: (MY CURRENT CHOICE)

Rename the output file after compilation, saving the full name of the internal assembly (using the event after the assembly or manual renaming):

  • Assembly Name: Tek4.Utilities.ConsoleApp
  • EXE File name: Tek4.Utilities.ConsoleApp.exe → ConsoleApp.exe

With this solution, a collision name is unlikely, and wherever the assembly name is displayed (i.e. stack traces, system event logs, etc.), it is easy to identify the source.

- .

?

.

+3
3

, .

, , , GUI :

GUI: SuperApp.exe CLI: SuperApp.Console.exe

FWIW

+1

, . , SuperApp.exe . , - . ;)

+1

:

YourCompany.YourProduct.Gui
YourCompany.YourProduct.Gui.Controllers

.

-1

All Articles