• <i id='nbdku'><tr id='nbdku'><dt id='nbdku'><q id='nbdku'><span id='nbdku'><b id='nbdku'><form id='nbdku'><ins id='nbdku'></ins><ul id='nbdku'></ul><sub id='nbdku'></sub></form><legend id='nbdku'></legend><bdo id='nbdku'><pre id='nbdku'><center id='nbdku'></center></pre></bdo></b><th id='nbdku'></th></span></q></dt></tr></i><div id='nbdku'><tfoot id='nbdku'></tfoot><dl id='nbdku'><fieldset id='nbdku'></fieldset></dl></div>

      <small id='nbdku'></small><noframes id='nbdku'>

        <bdo id='nbdku'></bdo><ul id='nbdku'></ul>

      1. <legend id='nbdku'><style id='nbdku'><dir id='nbdku'><q id='nbdku'></q></dir></style></legend>

        <tfoot id='nbdku'></tfoot>

        在 vb.net 3.5 项目中使用相同命名空间的引用 2 dll?

        Reference 2 dlls using the same namespace in vb.net 3.5 project?(在 vb.net 3.5 项目中使用相同命名空间的引用 2 dll?)

              <tfoot id='JxgHj'></tfoot>
              <legend id='JxgHj'><style id='JxgHj'><dir id='JxgHj'><q id='JxgHj'></q></dir></style></legend>
              <i id='JxgHj'><tr id='JxgHj'><dt id='JxgHj'><q id='JxgHj'><span id='JxgHj'><b id='JxgHj'><form id='JxgHj'><ins id='JxgHj'></ins><ul id='JxgHj'></ul><sub id='JxgHj'></sub></form><legend id='JxgHj'></legend><bdo id='JxgHj'><pre id='JxgHj'><center id='JxgHj'></center></pre></bdo></b><th id='JxgHj'></th></span></q></dt></tr></i><div id='JxgHj'><tfoot id='JxgHj'></tfoot><dl id='JxgHj'><fieldset id='JxgHj'></fieldset></dl></div>

                <tbody id='JxgHj'></tbody>
            1. <small id='JxgHj'></small><noframes id='JxgHj'>

              • <bdo id='JxgHj'></bdo><ul id='JxgHj'></ul>

                  本文介绍了在 vb.net 3.5 项目中使用相同命名空间的引用 2 dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个 vb.net 3.5 类库项目,它需要引用两个具有相同命名空间的程序集.我们有两个第三方 dll,其中一个是 5.1 版,另一个是 6.1 版.它们具有相同的 dll 文件名,并且使用相同的命名空间和函数/类名.项目需要根据具体情况使用其中一种.

                  I have a vb.net 3.5 class library project that needs to reference two assemblies that have the same namespace. We have two third party dll's in which one is version 5.1 and the other is version 6.1. They have the same dll filename and they utilize the same namespace and functions/class names. The project needs to use one or the other depending on a specific situation.

                  我研究了一个使用外部别名"功能来拉入不同程序集的 c# 进程.

                  I've investigated up on a c# process that uses the "extern alias" feature to pull in the different assemblies.

                  http://blogs.msdn.com/b/ansonh/archive/2006/09/27/774692.aspx

                  有什么用Visual Studio 8 中程序集引用的 Aliases 属性

                  似乎此功能不适用于 vb.net.

                  It seems that this feature isn't fully available for vb.net.

                  我尝试过的事情

                  我已重命名第二个 dll 并将两个引用都添加到我的项目中.在这一点上,我得到了很多:'blah' 在命名空间中不明确.

                  I've renamed the 2nd dll and added both references to my project. At this point I get tons of: 'blah' is ambiguous in the namespace.

                  所以我需要给不同的版本起别名.在 vb.net 中,您可以在导入语句上使用别名,例如:

                  So I need to alias the different versions. In vb.net you can do aliases on an imports statement like:

                  Imports version5 = Somedll.Something
                  

                  问题是我无法为不同版本的 dll 设置程序集引用别名.显然在 vb.net 中,您无法在参考属性窗口中进行设置.所以我尝试将它们设置在我的项目文件中,如下所示:

                  The problem is I can't setup an assembly reference alias for the different versions of the dll. Apparently in vb.net you can't set these up in the reference properties window. So I tried setting them in in my project file like this:

                  <Reference Include="somedll.5.Navigation">
                    <HintPath>....UtilityThirdPartyDLLSsomedll.5.dll</HintPath>
                        <Aliases>SomeDLL5</Aliases>
                        <Private>False</Private>
                  </Reference>
                  <Reference Include="somedll.6.Navigation, Version=6.1.0.0, Culture=neutral, PublicKeyToken=6d02be8724ca751c, processorArchitecture=MSIL">
                    <SpecificVersion>False</SpecificVersion>
                    <HintPath>....UtilityThirdPartyDLLSsomedll.6.dll</HintPath>
                        <Aliases>SomeDLL6</Aliases>
                        <Private>False</Private>
                  </Reference>
                  

                  然后我希望这会起作用:

                  I would then expect this to work:

                  Imports version5 = SomeDLL5.Something
                  Imports version6 = SomeDLL6.Something
                  

                  但是SomeDLL5/6"没有出现在智能感知中.那么如何在同一个项目中引用两个 dll 呢?

                  But the "SomeDLL5/6" doesn't show up in intellisense. So how can I reference both dll's in the same project?

                  推荐答案

                  我是 VB 规范负责人.恐怕没有 VB 方法可以做到这一点(正如 DaMartyr 所说,缺少反射).我知道这是一个拖累.我会将它列入我们下一次 VB 语言设计会议的议程.

                  I'm the VB spec lead. I'm afraid that there's no VB way of doing this (short of reflection, as DaMartyr said). I know this is a drag. I'll put it on the agenda for our next VB Language Design Meeting.

                  这篇关于在 vb.net 3.5 项目中使用相同命名空间的引用 2 dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  IBM.Data.DB2.Core connection problems(IBM.Data.DB2.Core 连接问题)
                  Datetime field overflow with IBM Data Server Client v9.7fp5(IBM Data Server Client v9.7fp5 的日期时间字段溢出)
                  Using entity Framework with .NET Core and DB2(将实体框架与 .NET Core 和 DB2 结合使用)
                  IBM .NET Data Provider Connection String issue with Library List(库列表的 IBM .NET 数据提供程序连接字符串问题)
                  .NET DB2 OLEDB pre-requisites(.NET DB2 OLEDB 先决条件)
                  Cannot connect to DB2: IBM.Data.DB2.Core version 3.1.0.400 on Azure Function(无法连接到 DB2:Azure 函数上的 IBM.Data.DB2.Core 版本 3.1.0.400)
                1. <small id='K5FbR'></small><noframes id='K5FbR'>

                  <tfoot id='K5FbR'></tfoot>

                    <legend id='K5FbR'><style id='K5FbR'><dir id='K5FbR'><q id='K5FbR'></q></dir></style></legend>
                    <i id='K5FbR'><tr id='K5FbR'><dt id='K5FbR'><q id='K5FbR'><span id='K5FbR'><b id='K5FbR'><form id='K5FbR'><ins id='K5FbR'></ins><ul id='K5FbR'></ul><sub id='K5FbR'></sub></form><legend id='K5FbR'></legend><bdo id='K5FbR'><pre id='K5FbR'><center id='K5FbR'></center></pre></bdo></b><th id='K5FbR'></th></span></q></dt></tr></i><div id='K5FbR'><tfoot id='K5FbR'></tfoot><dl id='K5FbR'><fieldset id='K5FbR'></fieldset></dl></div>
                    • <bdo id='K5FbR'></bdo><ul id='K5FbR'></ul>
                        <tbody id='K5FbR'></tbody>