简体   繁体   English

在解决方案的某些项目中更新参考

[英]Updating a reference in certain projects of a solution

Having a big solution containing tens of projects seems to get hard to maintain. 具有包含数十个项目的大型解决方案似乎很难维护。 I need to update packages in some of these projects, but I do not want to touch them in all projects. 我需要在其中一些项目中更新软件包,但我不想在所有项目中都涉及它们。

Say for example, I want to update Entity Framework to version 6 in one class library project, but let the remaining projects keep using an older version. 例如,我想在一个类库项目中将Entity Framework更新为版本6,但让其余项目继续使用旧版本。 But since another project will need to call both projects using EF5 and EF6, will this even be possible? 但是由于另一个项目将需要使用EF5和EF6调用这两个项目,这是否有可能?

Also, is it somehow possible to modularize class libraries so that they have their own dependencies, but do not make callers of these libraries dependent on the libraries dependencies? 另外,是否可以通过某种方式模块化类库,使它们具有自己的依赖关系,但又不使这些库的调用者依赖于库的依赖关系呢? (Normally I need to add references to the dependency in both calling project, and in the project actually using the dependency directly). (通常,我需要在调用项目以及实际直接使用依赖项的项目中添加对依赖项的引用)。 I pretty much want to make this class library a black box. 我非常想使此类库成为黑匣子。 The calling code shouldn't need to know what the black box does. 调用代码不需要知道黑匣子的功能。 And shouldn't need to add 10 different google api dll's to be able to use it. 并且不需要添加10个不同的Google api dll即可使用它。

Consider ILMerge ? 考虑使用ILMerge吗? ILMerge can combine multiple DLLs to a single library, meaning that you can package any dependancies with your DLL. ILMerge可以将多个DLL组合到一个库中,这意味着您可以将任何依赖关系与DLL打包在一起。

I can't give you usage advice however, I don't have firsthand experience. 我无法为您提供使用建议,但是我没有亲身经验。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM