在.NET中并排 [英] Side by side in .NET

查看:64
本文介绍了在.NET中并排的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该知道这一点,但是只是让自己感到非常困惑.状况:

我有一个引用两个外部程序集A和B(均为版本1)的项目.然后,我收到了一个新版本的A(v2),该版本已利用了一个新版本的B(v2).不幸的是,B的标记尚未使v2与v1向后兼容,而我的项目希望v1.

所以我的项目想要B v.1,但使用A v.2,想要b v.2.没有强名.我有什么选择?

I should know this, but have just got myself very confused. Situation:

I have a project which references two external assemblies, A and B, both version 1. Then I receive a new version of A (v2) which has taken advantage of a new version of B (v2). Unfortunately, the markers of B have not made v2 backward compatible with v1, and my project expects v1.

So my project wants B v.1 but uses A v.2 which wants b v.2. There are no strong names. What are my options?

推荐答案

我发现^ ]成为有趣的阅读.应该为您提供使用同一个dll的两个版本的另一种方法.
I found this[^] to be an interesting read. Should give you an alternate way of using two versions of the same dll.


我不确定这是否适用于未签名的程序集,从来不需要尝试 http://msdn.microsoft.com/en-us/library/eftw1fys.aspx [ ^ ]

如果它不起作用,则可能需要考虑唱歌装配体
http://msdn.microsoft.com/en-us/library/xc31ft41.aspx [ ^ ]
I''m not sure if this will work for unsigned assemblies, never had the need to try it http://msdn.microsoft.com/en-us/library/eftw1fys.aspx[^]

If it doesn''t work you may want to look into singing the assemblies
http://msdn.microsoft.com/en-us/library/xc31ft41.aspx[^]


您的应用程序通常应使用每个DLL的私有版本(可能是GAC中安装的那些DLL除外).

因此,您的应用程序将使用每个程序集的v1,因为您将它们与可执行文件一起提供.

由于A和B都有新版本(v2),因此,如果要使用A v.2.,则应该将游览项目升级为也使用B v.2,这样可以避免此问题,请减少DLL的数量(因此内存使用情况和加载时间).

顺便说一句,我认为这有很多假设……因为通常每个制造商都只能依靠自己(和.NET框架).

在大多数情况下,两个版本应该兼容,或者只需要进行少量调整即可.
Your application should typically use it private version of each DLL (except maybe for those that are installed in the GAC).

Thus your application would uses v1 of each assembly since you ship them with your executable.

Since both A and B have new versions (v2), then if you want to use A v.2., you should upgrade tour project to also uses B v.2 which will avoid the problem, reduce the number of DLLs (thus the memory usage and load time).

By the way, I think this is a lot hypothetical... as generally each maker would only depends on itself (and the .NET framework).

Most of the time both version should be compatible or only a few adjustment would be required.


这篇关于在.NET中并排的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆