引用相同的两个具有不同版本的DLL [英] Reference Same Two DLLs with Different Versions

查看:155
本文介绍了引用相同的两个具有不同版本的DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个程序使用外部MS Access数据库来获取信息并使用内部数据集进行操作,然后使用报表查看器显示它。此功能在我安装了SQL Server 2008 R2和SQL Server 2012的计算机上运行良好。但是,当我尝试安装时,它需要程序集Microsoft.SqlServer.Types版本10.0.0.0和11.0.0.0。



我尝试在Visual Studio中使用添加引用gui,但由于它们是同一个名称,编译器不接受添加两个引用。稍微深入研究一下,我尝试通过vbproj文件添加引用。



I have a program that uses an outside MS Access database to grab information and manipulates using an internal dataset, then displays it using a report viewer. This function works perfectly well on my computer which has SQL Server 2008 R2 and SQL Server 2012 installed. However, when I try to install, it requires assemblies Microsoft.SqlServer.Types versions 10.0.0.0 and 11.0.0.0.

I tried using the add reference gui in Visual Studio, but since they are same name, the compiler did not accept adding the two references. Digging into it a little, I tried to add the references through the vbproj file.

<Reference Include="Microsoft.SqlServer.Types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
      <SpecificVersion>True</SpecificVersion>
      <HintPath>C:\Program Files (x86)\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.Types.dll</HintPath>
<Aliases>testing1</Aliases>      
<Private>True</Private>
    </Reference>
    <Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
      <SpecificVersion>True</SpecificVersion>
      <HintPath>C:\Program Files (x86)\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Types.dll</HintPath>
      <Aliases>testing</Aliases>
      <Private>True</Private>
    </Reference>





我正在尝试使用别名测试和测试1。但是,当我尝试部署项目时,我注意到版本11.0.0.0没有给我任何问题,但10.0.0.0无法识别。



我不确定如何在不必通过安装SQL Server 2008 R2在GAC中安装库的情况下包含它 - 我无论出于何种原因我都没有安装权限。



感谢您的光临帮助。



I am trying to use aliases testing and testing1. However, when I try to deploy the project, I notice that version 11.0.0.0 gives me no issues, however 10.0.0.0 is not recognized.

I am not sure how to include this without having to install the libraries in GAC through installing SQL Server 2008 R2 - I do not have install permissions for that installation for whatever reason.

Thanks for the help.

推荐答案

您好b $ b

我应该删除旧版SQL实现的依赖关系MSSQL服务器通常是向后兼容的。无论如何,请查看这个项目文件的依赖项跟踪器并查看更多详细信息。



很明显,虽然您的项目已经完成,但没有什么能阻止您将整个根文件夹复制到某个地方安全并使用存储库来保持您的回滚选项打开:)



http:// dependencyfinder.codeplex.com/


我遇到了log4net的问题



这对我有帮助 [ ^ ]

,一次运行2个版本。

它希望它适合你的问题;)
I had simmilar Problem with log4net

this helped me[^]
to have 2 Versions of it running at a time.
it hope it fits your problem ;)


这篇关于引用相同的两个具有不同版本的DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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