DLL地狱 [英] DLL hell

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

问题描述

您好,

我最近开始编译多项目解决方案时出现问题。

我有几个ASP.Net项目引用了.Net DLL的范围我已经写了.b $ b。例如:


ASP.NET项目包括对 - A.DLL,B.DLL,C.DLL,D.DLL等的引用。


相当多的DLL包括对我的数据层组件的引用,

Data.DLL,但我的ASP.Net项目没有。在编译我的解决方案时我经常会看到一个类似的错误,


"依赖关系Data.dll版本1.0.20008无法复制到运行

目录因为它会与依赖Data.dll版本冲突

1.0.20010 ..."


它似乎通常我可以通过包含所有引用Data.DLL的DLL的项目以及Data.DLL本身的项目来解决这个问题,

在解决方案中并使每个直接引用Data.DLL项目

而不是编译的DLL。应该是这样的吗?刚才我已经完成了这个,并且完全将这个编译器从Debug切换到Release。

再次填充所有内容。


任何人都可以给我指导开发这类多项目

解决方案,而不是看到可怕的依赖x不能复制到运行目录的
... "错误?


在此先感谢,


托比马修斯

Hi there,

I have recently started having problems compiling multi-project solutions.
I have a couple of ASP.Net projects that reference a range of .Net DLLs I
have written. For example:

ASP.NET project includes references to - A.DLL, B.DLL, C.DLL, D.DLL etc.

Quite a few of the DLLs include references to my data layer component,
Data.DLL, but my ASP.Net project does NOT. When compiling my solution I
frequently see an error that goes something like,

"The dependency Data.dll version 1.0.20008 cannot be copied to the run
directory because it would conflict with the dependancy Data.dll version
1.0.20010..."

It seems that usually I can get round this by including the projects for
ALL the DLLs that reference Data.DLL, plus the project for Data.DLL itself,
in the solution and making each one refer directly to the Data.DLL project
rather than the compiled DLL. Should this be the case? Just now I had done
exactly this, and switching the compiler from Debug to Release completely
stuffed everything up again.

Can anyone give me guidelines for developing these sort of multi-project
solutions and not seeing the dreaded "The dependency x cannot be copied to
the run directory..." error?

Thanks in advance,

Toby Mathews

推荐答案

On Tue,2004年8月10日12:28:15 +0100,Toby Mathews <到*************** @ yahoo.spamfree.co.uk>写道:

$ b $b¤你好,
$ b $b¤
$ b $b¤我最近开始编译多项目解决方案时遇到了问题。 /> $ b $b¤我有几个ASP.Net项目,它们引用了一系列的.Net DLL,我已经写了。例如:
$ b $b¤
$ b $b¤ASP.NET项目包括对 - A.DLL,B.DLL,C.DLL,D.DLL等的引用。
$ b $b¤
$ b $b¤相当多的DLL包括对我的数据层组件的引用,
$ b $b¤Data.DLL,但我的ASP.Net项目没有。在编译我的解决方案时我经常会看到一个错误,例如,
$ b $b¤
$ b $b¤依赖Data.dll版本1.0 .20008无法复制到运行
$ b $b¤目录,因为它会与依赖Data.dll版本冲突
$ b $b¤1.0.20010..."
$ b $b¤
$ b $b¤看起来通常我可以通过包含所有引用Data.DLL的DLL以及项目的项目来解决这个问题。 Data.DLL本身,
$ b $b¤在解决方案中并使每一个直接引用Data.DLL项目
$ b $b¤而不是编译的DLL。应该是这样的吗?刚才我已经完成了这个,并且完全将这个编译器从Debug转换为Release。
$ b $b¤再次填满所有内容。
$ b $b¤
$ b $b¤任何人都可以给我指导开发这类多项目的方案,而不是看到可怕的依赖x无法复制到
$ b $b¤运行目录......错误?

http://msdn.microsoft.com/library/de...ndencyFile.asp


是的。强化你的程序集并将它们注册到GAC(全局程序集缓存)。

Paul ~~~ pc * *****@ameritech.net

Microsoft MVP(Visual Basic)
On Tue, 10 Aug 2004 12:28:15 +0100, "Toby Mathews" <to***************@yahoo.spamfree.co.uk> wrote:

¤ Hi there,
¤
¤ I have recently started having problems compiling multi-project solutions.
¤ I have a couple of ASP.Net projects that reference a range of .Net DLLs I
¤ have written. For example:
¤
¤ ASP.NET project includes references to - A.DLL, B.DLL, C.DLL, D.DLL etc.
¤
¤ Quite a few of the DLLs include references to my data layer component,
¤ Data.DLL, but my ASP.Net project does NOT. When compiling my solution I
¤ frequently see an error that goes something like,
¤
¤ "The dependency Data.dll version 1.0.20008 cannot be copied to the run
¤ directory because it would conflict with the dependancy Data.dll version
¤ 1.0.20010..."
¤
¤ It seems that usually I can get round this by including the projects for
¤ ALL the DLLs that reference Data.DLL, plus the project for Data.DLL itself,
¤ in the solution and making each one refer directly to the Data.DLL project
¤ rather than the compiled DLL. Should this be the case? Just now I had done
¤ exactly this, and switching the compiler from Debug to Release completely
¤ stuffed everything up again.
¤
¤ Can anyone give me guidelines for developing these sort of multi-project
¤ solutions and not seeing the dreaded "The dependency x cannot be copied to
¤ the run directory..." error?

http://msdn.microsoft.com/library/de...ndencyFile.asp

Yes. Strong name your assemblies and register them with the GAC (Global Assembly Cache).
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


2004年8月10日星期二12: 28:15 +0100,Toby Mathews <到*************** @ yahoo.spamfree.co.uk>写道:

$ b $b¤你好,
$ b $b¤
$ b $b¤我最近开始编译多项目解决方案时遇到了问题。 /> $ b $b¤我有几个ASP.Net项目,它们引用了一系列的.Net DLL,我已经写了。例如:
$ b $b¤
$ b $b¤ASP.NET项目包括对 - A.DLL,B.DLL,C.DLL,D.DLL等的引用。
$ b $b¤
$ b $b¤相当多的DLL包括对我的数据层组件的引用,
$ b $b¤Data.DLL,但我的ASP.Net项目没有。在编译我的解决方案时我经常会看到一个错误,例如,
$ b $b¤
$ b $b¤依赖Data.dll版本1.0 .20008无法复制到运行
$ b $b¤目录,因为它会与依赖Data.dll版本冲突
$ b $b¤1.0.20010..."
$ b $b¤
$ b $b¤看起来通常我可以通过包含所有引用Data.DLL的DLL以及项目的项目来解决这个问题。 Data.DLL本身,
$ b $b¤在解决方案中并使每一个直接引用Data.DLL项目
$ b $b¤而不是编译的DLL。应该是这样的吗?刚才我已经完成了这个,并且完全将这个编译器从Debug转换为Release。
$ b $b¤再次填满所有内容。
$ b $b¤
$ b $b¤任何人都可以给我指导开发这类多项目的方案,而不是看到可怕的依赖x无法复制到
$ b $b¤运行目录......错误?

http://msdn.microsoft.com/library/de...ndencyFile.asp


是的。强化你的程序集并将它们注册到GAC(全局程序集缓存)。

Paul ~~~ pc * *****@ameritech.net

Microsoft MVP(Visual Basic)
On Tue, 10 Aug 2004 12:28:15 +0100, "Toby Mathews" <to***************@yahoo.spamfree.co.uk> wrote:

¤ Hi there,
¤
¤ I have recently started having problems compiling multi-project solutions.
¤ I have a couple of ASP.Net projects that reference a range of .Net DLLs I
¤ have written. For example:
¤
¤ ASP.NET project includes references to - A.DLL, B.DLL, C.DLL, D.DLL etc.
¤
¤ Quite a few of the DLLs include references to my data layer component,
¤ Data.DLL, but my ASP.Net project does NOT. When compiling my solution I
¤ frequently see an error that goes something like,
¤
¤ "The dependency Data.dll version 1.0.20008 cannot be copied to the run
¤ directory because it would conflict with the dependancy Data.dll version
¤ 1.0.20010..."
¤
¤ It seems that usually I can get round this by including the projects for
¤ ALL the DLLs that reference Data.DLL, plus the project for Data.DLL itself,
¤ in the solution and making each one refer directly to the Data.DLL project
¤ rather than the compiled DLL. Should this be the case? Just now I had done
¤ exactly this, and switching the compiler from Debug to Release completely
¤ stuffed everything up again.
¤
¤ Can anyone give me guidelines for developing these sort of multi-project
¤ solutions and not seeing the dreaded "The dependency x cannot be copied to
¤ the run directory..." error?

http://msdn.microsoft.com/library/de...ndencyFile.asp

Yes. Strong name your assemblies and register them with the GAC (Global Assembly Cache).
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


这会在部署我的时候导致任何问题网络应用。从测试机器

到现场机器?


" Paul Clement" < US ******** @ swspectrum.com>在消息中写道

news:q9 ******************************** @ 4ax.com ...
Will this cause any problems when deploying my web app. from a test machine
to the live machine?

"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:q9********************************@4ax.com...
2004年8月10日星期二12:28:15 +0100,Toby Mathews
<到*************** @ yahoo.spamfree.co.uk>写道:
¤你好,
我最近开始编译多项目
解决方案时出现问题。 ¤我有几个ASP.Net项目引用了我写的一系列.Net DLL
。例如:
¤
¤ASP.NET项目包括对 - A.DLL,B.DLL,C.DLL,D.DLL等的引用。
¤
¤相当一个很少有DLL包含对我的数据层组件的引用,即Data.DLL,但我的ASP.Net项目没有。在编译我的解决方案时,我经常看到一个类似的错误,
¤
¤依赖Data.dll版本1.0.20008无法复制到运行中
¤目录因为它会与依赖Data.dll版本冲突§1.0.20010......
¤
¤看来通常我可以通过包含项目来解决这个问题
表示所有引用Data.DLL的DLL,加上Data.DLL
本身的项目,¤在解决方案中并使每一个直接引用Data.DLL
项目¤而不是编译的DLL。应该是这样的吗?刚才我完成了这个
,将编译器从Debug切换到Release
完全把所有东西都塞进去了。
¤
¤任何人都可以给我开发这些的指导一种
多项目¤解决方案,而不是看到可怕的依赖x不能被复制
到¤运行目录......错误?

http://msdn.microsoft.com/library/de...ndencyFile.asp
是的。强化你的程序集并将它们注册到GAC(全球
程序集缓存)。

Paul ~~~ pc ****** @ ameritech.net
Microsoft MVP(Visual Basic)
On Tue, 10 Aug 2004 12:28:15 +0100, "Toby Mathews" <to***************@yahoo.spamfree.co.uk> wrote:
¤ Hi there,
¤
¤ I have recently started having problems compiling multi-project solutions. ¤ I have a couple of ASP.Net projects that reference a range of .Net DLLs I ¤ have written. For example:
¤
¤ ASP.NET project includes references to - A.DLL, B.DLL, C.DLL, D.DLL etc.
¤
¤ Quite a few of the DLLs include references to my data layer component,
¤ Data.DLL, but my ASP.Net project does NOT. When compiling my solution I
¤ frequently see an error that goes something like,
¤
¤ "The dependency Data.dll version 1.0.20008 cannot be copied to the run
¤ directory because it would conflict with the dependancy Data.dll version
¤ 1.0.20010..."
¤
¤ It seems that usually I can get round this by including the projects for ¤ ALL the DLLs that reference Data.DLL, plus the project for Data.DLL itself, ¤ in the solution and making each one refer directly to the Data.DLL project ¤ rather than the compiled DLL. Should this be the case? Just now I had done ¤ exactly this, and switching the compiler from Debug to Release completely ¤ stuffed everything up again.
¤
¤ Can anyone give me guidelines for developing these sort of multi-project ¤ solutions and not seeing the dreaded "The dependency x cannot be copied to ¤ the run directory..." error?

http://msdn.microsoft.com/library/de...ndencyFile.asp
Yes. Strong name your assemblies and register them with the GAC (Global Assembly Cache).

Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)



这篇关于DLL地狱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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