Search code examples
c#naming-conventionsprojects-and-solutions

Project naming conventions: [Company].[ProjectName] vs [Company_ProjectName]


Is it good practice to name preface project names within a solution like so?

  • CompanyName.P01
  • CompanyName.P02
  • CompanyName.P03

Or is it safer to use a convention like this?

  • CompanyName_P01
  • CompanyName_P02
  • CompanyName_P03

To me, the [.] separator looks nicer, and provides intellisense, but is there any caveat to using it?


Solution

  • Most of the solutions I came across follow the following convention:

    CompanyName.SolutionName.LayerName
    

    So basically in a company named COMP and a Project Named StackOverflow, you would end up with a project that looks like this:

    COMP.StackOverflow.Business
    COMP.StackOverflow.Data
    COMP.StackOverflow.Web
    COMP.StackOverflow.Core
    

    This allows you to easily manage the generated assembly, so if you need to create a common library to be used in your company. You would name it:

    COMP.SomeFrameworkName;
    

    That would easily seperate your company's (or Team's) Dlls from external Dlls and Nuget Packages.