开发者

Adding referenced assemblies to version control or just keep reference to GAC

We had a discussion with the colleagues about project references and version control systems. We're divided in 2 groups:

  • Add all referenced assemblies (except for the default .NET Fram开发者_Python百科ework) to a references folder in your solution, reference from there and check this folder in into your version control system. Pros: everybody can check out the code and build the project, no matter on which environment he's working.

  • Reference to the GAC for all major products (e.g. SharePoint) and only add more exotic libraries in the references folder, after all people working on the project have their system set up for the job (like have SharePoint installed for SharePoint development, since VS2010 doesn't open these solutions without). Pros: you're sure that you're working against the real installed assemblies and not some beta/SP/.. version that one of the developers has installed and copied over to the references folder.

What's the best practice? Or are there even better solutions?


if you reference against the GAC version of assemblies then you need to maintain a list of installed addons so a new developer can start work straight away. If you don't maintain this list then when a developer does an initial check out from source control the solution will not build.

Also if referencing from the GAC a CI system may not have a successful build due to the same reasons. I know its not a great solution to store binary assemblies in source control but at least it means all developers will be using the same versions of files

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜