简体   繁体   中英

Using different versions of the same assembly with .net core

In full .net framework, we could use two versions of a same assembly thanks to binding redirection:

like that:

<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" />
                <codeBase version="1.1.0.0" href="v2.1\Castle.Core.dll" />
                <codeBase version="1.2.0.0" href="v2.2\Castle.Core.dll" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>

source: Using different versions of the same assembly in the same folder

How to do in that with .net core?

I think, that´s not possible at the moment:

Adding a bindingRedirect to a.Net Standard library

Maybe the link will give you some more insights. There it is about .NET Standard as well as .NET Core.

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