我有一个网站项目,我使用内置的开发 Web 服务器从 Visual Studio 运行。网站的虚拟路径设置为/
web.config 包含一个运行时元素
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CMS.Controls" publicKeyToken="834b12a258f213f9" culture="neutral" />
<bindingRedirect oldVersion="4.1.3518.21577" newVersion="4.1.3561.21846" />
</dependentAssembly>
</assemblyBinding>
</runtime>
我已经删除了xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"
从根开始的属性configuration
元素。
这是错误:
无法加载文件或程序集
'CMS.Controls,版本=4.1.3518.21577,
文化=中立,
PublicKeyToken=834b12a258f213f9' 或
它的依赖项之一。位于的
程序集的清单定义确实
与装配参考不匹配。
(HRESULT 异常:0x80131040)
这是绑定的日志:
The operation failed.
Bind result: hr = 0x80131040. No description available.
...
LOG: DisplayName = CMS.Controls, Version=4.1.3518.21577, Culture=neutral, PublicKeyToken=834b12a258f213f9
(Fully-specified)
...
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Project\WebSite\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: CMS.Controls, Version=4.1.3518.21577, Culture=neutral, PublicKeyToken=834b12a258f213f9
...
LOG: Assembly Name is: CMS.Controls, Version=4.1.3561.21846, Culture=neutral, PublicKeyToken=834b12a258f213f9
WRN: Comparing the assembly name resulted in the mismatch: Revision Number
在我看来,它忽略了我的重定向。我看了一个小时了,是不是有错别字啊?