nuget – 为什么在安装autofac时我的所有web.configs都使用程序集重定向进行更新?

我刚刚将autofac安装到我的一个项目中,称之为项目A,在我使用nuget的解决方案中.出于某种原因,我的所有web.config文件,我在解决方案中有多个Web应用程序和api,使用像这样的程序集重定向更新:
<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
        </dependentAssembly>
    </assemblyBinding>
</runtime>

这意味着程序集重定向是什么意思?解决方案如何知道所有这些web.config文件需要更新?是因为我的Web应用程序引用了项目A吗?

解决方法

这与Autofac无关,因为它是nuget功能

nuget-1.2 release notes:

Automatically Add Binding Redirects

When installing a package with
strong named assemblies,NuGet can Now detect cases where the project
requires binding redirects to be added to the configuration file in
order for the project to compile and add them automatically.

您可以在发行说明:NuGet versioning Part 3: unification via binding redirects中提到的文章中阅读有关为什么需要组装redersicts的更多信息

通常可以从MSDN:Redirecting Assembly Versions开始了解程序集重新存储

相关文章

vue阻止冒泡事件 阻止点击事件的执行 &lt;div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些