我正在尝试在 asp 网站中使用 Ajax 控件工具包.我从我以前的示例项目之一中复制了 dll.它有以下详细信息
I am trying to use Ajax control toolkit in asp website. I copied the dll from one of my previous sample project. It has the following details
Assembly Version – 3.5.40412.0 File Version - 3.5.40412.2 Internal Name: Ajax Control Toolkit Language : Neutral Product Version - 3.5.40412.2当我添加对此程序集的引用时,它在引用列表中显示为AjaxControlToolkit-3.5.40412.2".当我运行解决方案时,我得到一个 FileLoadException:
When I add reference to this assembly, it appears as "AjaxControlToolkit-3.5.40412.2" in the reference list. When I run the solution, I get a FileLoadException:
无法加载文件或程序集AjaxControlToolkit-3.5.40412.2"或其依赖项之一.
Could not load file or assembly 'AjaxControlToolkit-3.5.40412.2' or one of its dependencies.
定位的程序集的清单定义与程序集引用不匹配.(来自 HRESULT 的异常:0x80131040)
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我认为问题在于程序集版本和文件版本的差异.是这样吗?我们怎样才能克服它?
I think the problem is with the difference in Assembly version and File version. Is it so? How can we overcome it?
推荐答案编辑web.config文件去掉引用,正常操作不需要:
Edit the web.config file to remove the reference, which is not required for normal operation:
1 - 打开网站根目录中的 web.config 文件
1 - Open the web.config file in the root of your site
2 - 找到以下行并注释掉():xxxxx-是您的程序集名称.
2 - Find the following line and comment it out():xxxxx-is your assembly name.
<add assembly="xxxxx", Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>3 - 保存并关闭 web.config 文件,然后重试
3 - Save and close the web.config file and try again
参考链接:manual.aspdotnetstorefront/p-1118-could-not-load-file-or-assembly-microsoftwebservices3-version3000-cultureneutral-publickeytoken31bf3856ad364e35.aspx
更多推荐
装配体和产品版本不匹配
发布评论