Should a .sln be committed to source control?

后端 未结 15 1454
时光说笑
时光说笑 2020-12-23 20:17

Is it a best practice to commit a .sln file to source control? When is it appropriate or inappropriate to do so?

Update There were several good poin

15条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-23 20:46

    Yes, things you should commit are:

    • solution (*.sln),
    • project files,
    • all source files,
    • app config files
    • build scripts

    Things you should not commit are:

    • solution user options (.suo) files,
    • build generated files (e.g. using a build script) [Edit:] - only if all necessary build scripts and tools are available under version control (to ensure builds are authentic in cvs history)

    Regarding other automatically generated files, there is a separate thread.

提交回复
热议问题