Naming convention for Visual Studio solutions and projects

前端 未结 6 858
梦毁少年i
梦毁少年i 2021-02-06 21:33

We were thinking about organizing our BIG project this way:

\\trunk
  [CompanyName]
    [Product1]
        [Project1]
          CompanyName.Product1.Project1.csproj
          


        
6条回答
  •  南方客
    南方客 (楼主)
    2021-02-06 22:08

    I consider this is better

    \trunk
      [CompanyName]
        [Product1]
          CompanyName.Product1.sln
          [Main] --Optional
            CompanyName.Product1.csproj
          [Project1]
            CompanyName.Product1.Project1.csproj
          [Project2]
            CompanyName.Product1.Project2.csproj
        [Product2]
          CompanyName.Product2.sln
          [Main] --Optional
            CompanyName.Product2.csproj
          [Project1]
            CompanyName.Product2.Project3.csproj
          [Project2]
            CompanyName.Product2.Project2.csproj
          [Project3]
            CompanyName.Product2.Project2.csproj
    

    Why? Because when you get the code from repository you get, by example, "Product1" directory, it contains all you need to work. The [Main] directory contains the default base namespace, usually the exe or main project. It is optional.

提交回复
热议问题