本文介绍了与普通/工具库工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我公司对我们的工作有一个由pretty参考我们建立那么多,从来应用工具项目。它有很多东西像NullHelpers,ConfigSettingHelpers,普通ExtensionMethods等。

At the company I work for we have a "Utility" project that is referenced by pretty much ever application we build. It's got lots of things like NullHelpers, ConfigSettingHelpers, Common ExtensionMethods etc.

我们的工作方式是,当我们想使一个新的项目,我们得到的最新版本,从源头控制项目将它添加到解决方案,然后从被添加到解决方案的新项目中引用该项目。

The way we work is that when we want to make a new project, we get the latest version of the project from source control add it to the solution and then reference the project from any new projects that get added to the solution.

这工作正常,但是已经有一对夫妇在这里的人取得了重大更改的共同项目,这为他们工作的实例,但对其他人不工作。

This has worked ok, however there have been a couple of instances where people have made "breaking changes" to the common project, which works for them, but doesn't work for others.

我一直在想,而不是增加普通库的项目引用也许我们应该开始发展的公共库作为一个独立的DLL和发布不同的版本,并针对特定项目的特定版本,这样可以改变用户没有任何风险使用公用库等项目。

I've been thinking that rather than adding the common library as a project reference perhaps we should start developing the common library as a standalone dll and publish different versions and target a particular version for a particular project so that changes can be made without any risk to other projects using the common library.

说了,我很感兴趣,看看别人是怎么引用或使用他们的公共库。

Having said all that I'm interested to see how others reference or use their common libraries.

推荐答案

这正是我们正在做的事情。我们有一些非项目的具体有用的功能的实用项目。我们增加了手动版(未成年人),建立发行版本的项目,签字并把它放到一个共享位置。

That's exactly what we're doing. We have a Utility project which has some non project specific useful functions. We increase the version manually (minor), build the project in Release version, sign it and put it to a shared location.

人们再使用的库的特定版本

如果一些有用的方法在其中可以找到自己的方式进入的主要工具项目的一些具体项目的实施,我们把项目中的一个特殊的辅助类,并将其标记为可能的候选工具(简单// TODO)。在项目结束时,我们回顾候选人,如果他们坚持,我们将它们移动到主要的

If some useful methods are implemented in some specific projects which could find their way into main Utility project, we put the to a special helper class in the project, and mark them as a possible Utility candidate (simple //TODO). At the end of the project, we review the candidates and if they stick, we move them to the main library.

最新的变化是一个没有没有,如果需要,我们纪念的方法和类为[过时。

Breaking changes are a no-no and we mark methods and classes as [Obsolete] if needed.

但是,这并不重要,因为我们增加的版本,每一个发布。

But, it doesn't really matter because we increase the version on every publish.

希望这有助于。

这篇关于与普通/工具库工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 19:59