Best Practice: Collaborative Environment, Bin Directory, SVN

后端 未结 5 1182
没有蜡笔的小新
没有蜡笔的小新 2020-12-30 19:40

What are the best practices for checking in BIN directories in a collaborative development environment using SVN? Should project level references be excluded from checkin?

相关标签:
5条回答
  • 2020-12-30 20:23

    Any assemblies that are expected to be in the GAC should stay in the GAC. This includes System.web.dll or any other 3rd party dll that you'll deploy to the GAC in production. This means a new developer would have to install these assemblies.

    All other 3rd party assemblies should be references through a relative path. My typical structure is:

    -Project
    --Project.sln
    --References
    ---StructureMap.dll
    ---NUnit.dll
    ---System.Web.Mvc.dll
    --Project.Web
    ---Project.Web.Proj
    ---Project.Web.Proj files
    --Project
    ---Project.Proj
    ---Project.Proj files
    

    Project.Web and Project reference the assemblies in the root/References folder relatively. These .dlls are checked into subversion.

    Aside from that, */bin */bin/* obj should be in your global ignore path.

    With this setup, all references to assemblies are either through the GAC (so should work across all computers), or relative to each project within your solution.

    0 讨论(0)
  • 2020-12-30 20:24

    Maven helps quite a lot with this problem when I'm coding java. We commit the pom.xml to the scs and the maven repository contains all our dependencies. For me that seems like a nice way to do it.

    0 讨论(0)
  • 2020-12-30 20:25

    Tree Surgeon is a great tool which creates an empty .NET development tree. It has been tweaked over years of use and implements lots of best practices.

    0 讨论(0)
  • 2020-12-30 20:27

    We follow the practice of using a vendor directory which contains all vendor specific headers and binaries. The goal is that anybody should be able to build the product just by checking it out and running some top level build script.

    0 讨论(0)
  • 2020-12-30 20:31

    Is this a .Net specific question?

    Generally the best practice is to not check in anything which is built automatically from files that are already in SCM. All of that is ideally created as part of your automatic build process.

    If the bin directory you're referring to contains third-party binaries, rather than a build of your project, ignore (downvote?) this advice.

    0 讨论(0)
提交回复
热议问题