简体   繁体   中英

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

As I recently updated a custom dll to version 1.0.3483.0, when I included that dll in the project, it required version 1.0.3478.

What are the steps I need to follow in order to update the dll in a project?

VS 2015 Error

VS 2015 错误

dll file version

dll文件版本

The dll was removed and added, and the project was unloaded and reloaded, but it still does not work.

You should be able to use bindingRedirect to use the specified version.

For example:

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM