Could not load file or assembly "App_Licenses.dll"的问题
程序员文章站
2024-03-31 19:47:04
今天在aspdotnetstorefront做定制化开发,编译的时候莫名其妙地报告could not load file or assembly 'app_licenses...
今天在aspdotnetstorefront做定制化开发,编译的时候莫名其妙地报告could not load file or assembly 'app_licenses, version=0.0.0.0, culture=neutral, ... (exception from hresult: 0x80070057 (e_invalidarg))的错误,检查文件系统,发现文件还在,然后查看文件夹权限,也没有发现任何异样。于是google。网上很多网友给出解决方案,比如:重启/重装asp.net,设置network service权限等等,结果无功而返。
后来我发现,不仅仅是这个app_licenses.dll无法加载,就算我从references中删去这个引用,仍然会提示其它的dll也无法加载的情况。而且,我重新安装一份新的aspdotnetstorefront应用也出现同样的问题。很明显,不是我解决方案本身的问题。
突然想起之前有过机器异常重启的经历,我估计是在异常重启的过程中造成了文件丢失或者损坏,于是先用iisreset/stop停止iis服务,然后打开asp.net的临时文件夹(在32bit,.net 2.0中,是%windows install folder%\microsoft.net\framework\v2.0.50727\temporary asp.net files),删除所有的文件和文件夹,再iisreset/start后,编译解决方案,一切正常。
这问题其实不复杂,但真正碰到这样的问题解决起来也挺难的。在此随笔一下,也希望能够帮到遇到同样问题的网友。
推荐阅读
-
Could not load file or assembly "App_Licenses.dll"的问题
-
Could not load file or assembly 'System.ValueTuple'
-
Could not load file or assembly "App_Licenses.dll"的问题
-
Could not load file or assembly ‘NQuantLib‘ or one of its dependencies. An attempt was made to load
-
完美解决Could not load file or assembly AjaxPro.2 or one of its dependencies. 拒绝访问。 原创
-
Could not load file or assembly 'Microsoft.SqlServer
-
Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc, Version=
-
Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc, Version=
-
完美解决Could not load file or assembly AjaxPro.2 or one of its dependencies. 拒绝访问。 原创
-
Jib构建镜像的问题分析(Could not find or load main class ${start-class})