【发布时间】:2017-07-18 23:48:04
【问题描述】:
我们公司有一个面向 5/6 开发人员的 ASP.NET 项目。所有 Visual Studio 2017 和 IIS Express 上的调试,没有疯狂的设置或任何让它运行的东西。
一位同事无法让它工作,他总是得到以下异常:
几个月前我们遇到了这个问题,然后出于沮丧重新安装了 PC,问题就消失了。几个星期没发育,今天问题又出现了。
我搜索了很久很久,但这是一个非常普遍的错误,我真的无法弄清楚。
当我运行融合日志查看器时,我看到以下结果:
The operation failed.
Bind result: hr = 0x80131018. No description available.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\IIS Express\iisexpress.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Users/User/Projects/project/project.UserSite/
LOG: Initial PrivatePath = C:\Users\User\Projects\project\project.UserSite\bin
LOG: Dynamic Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: Cache Base = C:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\vs\e0254dae
LOG: AppName = 38c6ff11
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\User\Projects\project\project.UserSite\web.config
LOG: Using host configuration file: C:\Users\User\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Binding succeeds. Returns assembly from C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll.
LOG: Assembly is loaded in default load context.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80131018).
*** Assembly Binder Log Entry (7/18/2017 @ 8:55:15 AM) ***
【问题讨论】:
-
只是为了好玩,你能不能进入解决方案>参考> System.ServiceModel.Activities>属性并验证属性“特定版本”设置为false。
-
@TravisActon 是的,它设置为 false。
-
堆栈跟踪有什么进一步的吗?也许事件日志中有一些东西?
-
启用融合日志来定位这个有问题的程序集在哪里(它的完整路径),然后使用ILSpy之类的工具来分析程序集并与另一台机器进行比较。