![](/img/trans.png)
[英]Why do I have to specify the assembly in my app.config but not for my web.config when using custom sections
[英]Why does my App.Config have this strange Assembly Redirect?
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1" />
</dependentAssembly>
我不明白“旧版本”上的0.0.0.0-
前缀
它的意思是:
0.0.0.0-4.0.2.1
版本0.0.0.0-4.0.2.1
(即任何版本<= 4.0.2.1
)的所有请求重定向到版本4.0.2.1
参考文档:
oldVersion :必需的属性。
指定最初请求的程序集版本。 程序集版本号的格式是major.minor.build.revision。 此版本号每个部分的有效值为 0 到 65535。
您还可以按以下格式指定一系列版本:
nnnn - nnnn
所以在你的例子中,我们有一系列的:
0.0.0.0-4.0.2.1
或任何小于或等于4.0.2.1
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.