Home > Database > Mysql Tutorial > body text

Exception from HRESULT: 0x800736B1,Could not load file or as

WBOY
Release: 2016-06-07 15:15:23
Original
2038 people have browsed it

今天发布Web项目,结果运行出错,错误信息如下: [COMException (0x800736b1): 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (Exception from HRESULT: 0x800736B1)] [FileLoadException: Could not load file or assem

今天发布Web项目,结果运行出错,错误信息如下:

[COMException (0x800736b1): 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (Exception from HRESULT: 0x800736B1)]

[FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. 由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。 (Exception from HRESULT: 0x800736B1)]

在网上搜索了半天,有不少人遇到这个问题,可惜没人解决……

只好自己想法处理,因为上周这个虚拟目录还能正常访问,并发现,别的虚拟目录都能正常访问

只有这个虚拟目录因为刚刚更新,不能打开任何页面,所以肯定是这个目录下有问题,而不是服务器问题

首先怀疑是Web.config问题,删除Web.config,问题依旧

接着怀疑是bin目录,进入bin目录,发现一个奇怪的dll文件:Microsoft.SqlServer.BatchParser.dll

删除之,OK,项目能正常运行了,

 

可是为什么会多出这个Microsoft.SqlServer.BatchParser.dll文件呢?而且每次生成,都会添加这个文件!!!

查看源代码引用,发现是项目里不知道什么时候添加了:

Microsoft.VisualStudio.TeamSystem.Data.UnitTesting

Microsoft.VisualStudio.QualityTools.UnitTestFramework
2个引用,

 

再查源代码历史记录,找到添加这2个引用的同事,他说他给项目添加新项时,误操作,点了添加数据库单元测试,后来删除了那个单元测试,可是没想到引用还在……

 

至此,原因也找到了,解决方法,删除那2个引用,还有一个自动生成的Databaseset.cs文件

再生成,没有问题了…………

 

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!