簡體   English   中英

類型“xxx”在未引用的程序集中定義

[英]The type 'xxx' is defined in an asembly that is not referenced

由於我最近將自定義 dll 更新為版本 1.0.3483.0,當我在項目中包含該 dll 時,它需要版本 1.0.3478。

為了更新項目中的 dll,我需要遵循哪些步驟?

VS 2015 錯誤

VS 2015 錯誤

dll 文件版本

dll文件版本

把dll去掉再添加,把工程卸載再重新加載,還是不行。

您應該能夠使用bindingRedirect來使用指定的版本。

例如:

<configuration>
    <runtime>
       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
             <assemblyIdentity name="myAssembly"
                               publicKeyToken="32ab4ba45e0a69a1"
                               culture="neutral" />
             <bindingRedirect oldVersion="1.0.0.0"
                              newVersion="2.0.0.0"/>
          </dependentAssembly>
       </assemblyBinding>
    </runtime>
</configuration>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM