.net – 如何使DLL引用其他版本的第二个DLL?

前端之家收集整理的这篇文章主要介绍了.net – 如何使DLL引用其他版本的第二个DLL?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当给定的DLL引用第二个DLL的特定版本时,它可以工作.但是如果第二版的版本比引用的版本新,那么使用这两个库的我的库项目会产生一个警告:

Warning 1 Found conflicts between different versions of the same dependent assembly.

而FxCop指出:

Warning 15 CA0060 : The indirectly-referenced assembly ‘NationalInstruments.Common,Version=9.0.40.362,Culture=neutral,PublicKeyToken=dc6ad606294fc298’ could not be found. This assembly is not required for analysis,however,analysis results could be incomplete. This assembly was referenced by: SimpleReadWrite

在这些警告解决之前,我无法在其他任何项目中引用我的库.我正在尝试使用

> NationalInstruments.NI4882.dll

在我的SimpleReadWrite项目中,但NationalInstruments.NI4882引用

> NationalInstruments.Common.dll v9.0.40.362

我只能找到一个更新的版本(9.1.40.159).如何解决这个问题呢?

解决方法

这里

http://digital.ni.com/public.nsf/allkb/46DE00265283A71586256FC000797682

是一个如何修复您的安装的说明,应该重新安装两个DLL,希望版本属于一起.

如果你真的想尝试将这些DLL混合在一起(最有可能不起作用),请阅读这篇前SO帖子,它解释了必要的步骤:

Upgrade a reference dll in a C# project without recompiling the project

猜你在找的Windows相关文章