There is Microsoft names of assemblies guideline but personally I don't like lengthy names in solution tree. When there are dozen of lengthy names it's hard to pick the project you want.
Do you keep project name same as assembly name or short it somehow?
For example if there is MyCompany.MyProject.Dal.dll assembly maybe it's more useful to name project simply Dal (but make it compilable into MyCompany.MyProject.Dal.dll) ?
Thank you in advance!
An assembly's name is stored in metadata and has a significant impact on the assembly's scope and use by an application. A strong-named assembly has a fully qualified name that includes the assembly's name, culture, public key, version number, and, optionally, processor architecture.
Assembly and DLL names don't have to correspond to namespace names, but it is reasonable to follow the namespace name when naming assemblies. A good rule of thumb is to name the DLL based on the common prefix of the namespaces contained in the assembly. For example, an assembly with two namespaces, MyCompany.
If you know the assembly's file system path, you can call the static (C#) or Shared (Visual Basic) AssemblyName. GetAssemblyName method to get the fully qualified assembly name.
An assembly is a file that is automatically generated by the compiler upon successful compilation of every . NET application. It can be either a Dynamic Link Library or an executable file. It is generated only once for an application and upon each subsequent compilation the assembly gets updated.
The project name (in common with the solution name) doesn't really matter to the output, as long as the project's "Assembly name:" and "Default namespace:" options are set correctly. So have fun, but I wouldn't take them too far from the namespace.
If your namespace is FooCorp.MegaProject.DAL.dll
, then anyone with the project already knows they work for FooCorp
, and they probably already have the project named on disk as MegaProject
, so it probably isn't going to add much confusion to just have DAL.csproj
, especially if this is in the path "...\FooCorp\MegaProject\DAL\DAL.csproj" or similar. I've certainly done this before (at my last job, where we had hundreds and hundreds of assemblies).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With