用于绑定重定向的框架配置在哪里?
Where is framework config for binding redirects?
我的 ASP.NET MVC
网络后端消耗了 System.Security.Cryptography.Algorithms.dll
。在构建时,dll 位于:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\Facades
.
在运行时,dll 解析为:
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security.Cryptography.Algorithms\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.Cryptography.Algorithms.dll
.
这是 fuslogvw
显示的内容:
...
LOG: Assembly download was successful. Attempting setup of file: path\to\bin\System.Security.Cryptography.Algorithms.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: System.Security.Cryptography.Algorithms, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.
LOG: Using application configuration file: path\to\web.config
LOG: Using host configuration file: C:\Users\xxx\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Version redirect found in framework config: 4.2.2.0 redirected to 4.0.0.0.
LOG: Post-policy reference: System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Binding succeeds. Returns assembly from C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security.Cryptography.Algorithms\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.Cryptography.Algorithms.dll.
LOG: Assembly is loaded in default load context.
我对线条特别感兴趣
LOG: Version redirect found in framework config: 4.2.2.0 redirected to 4.0.0.0.
问题:
上面提到的框架配置在哪里?日志中提到的三个文件中的 None(web.config
、machine.config
、aspnet.config
)包含 System.Security.Cryptography.Algorithms.dll
的绑定重定向指令,那么它在哪里呢?
您看到的行来自运行时内部的统一 table。
运行时对一些程序集有特殊的了解,并且对这些程序集应用特殊的绑定重定向如果没有指定用户指定的绑定重定向(在您提到的位置)。
我的 ASP.NET MVC
网络后端消耗了 System.Security.Cryptography.Algorithms.dll
。在构建时,dll 位于:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\Facades
.
在运行时,dll 解析为:
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security.Cryptography.Algorithms\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.Cryptography.Algorithms.dll
.
这是 fuslogvw
显示的内容:
...
LOG: Assembly download was successful. Attempting setup of file: path\to\bin\System.Security.Cryptography.Algorithms.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: System.Security.Cryptography.Algorithms, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.
LOG: Using application configuration file: path\to\web.config
LOG: Using host configuration file: C:\Users\xxx\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Version redirect found in framework config: 4.2.2.0 redirected to 4.0.0.0.
LOG: Post-policy reference: System.Security.Cryptography.Algorithms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Binding succeeds. Returns assembly from C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Security.Cryptography.Algorithms\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.Cryptography.Algorithms.dll.
LOG: Assembly is loaded in default load context.
我对线条特别感兴趣
LOG: Version redirect found in framework config: 4.2.2.0 redirected to 4.0.0.0.
问题:
上面提到的框架配置在哪里?日志中提到的三个文件中的 None(web.config
、machine.config
、aspnet.config
)包含 System.Security.Cryptography.Algorithms.dll
的绑定重定向指令,那么它在哪里呢?
您看到的行来自运行时内部的统一 table。
运行时对一些程序集有特殊的了解,并且对这些程序集应用特殊的绑定重定向如果没有指定用户指定的绑定重定向(在您提到的位置)。