无法使用IIS Express在VS2017中加载文件或程序集 [英] Could not load file or assembly in VS2017 with IIS express

查看:147
本文介绍了无法使用IIS Express在VS2017中加载文件或程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们公司中有一个ASP.NET项目,可为5/6开发人员运行.所有Visual Studio 2017并在IIS Express上进行调试,没有疯狂的设置或任何使其运行的方法.

We have a ASP.NET project in the company that runs for 5/6 developers. All Visual Studio 2017 and debug on IIS Express, no crazy setting or anything to make it run.

1位同事无法正常工作,他总是遇到以下异常:

1 colleague cannot get it to work, he always gets the following exception:

几个月前,我们遇到了这个问题,然后出于沮丧的考虑,重新安装了PC,问题就消失了.他已经好几个星期没有发展了,今天问题又出现了.

We had this problem a few months back, then out of frustration the PC was re-installed and the problem was gone. He didn't develop for a few weeks and today the problem appeared again.

我进行了很长时间的搜索,但这是一个一般性的错误,我无法真正弄清楚.

I searched long and far but it's such a generic error I can't really figure this one out.

运行融合日志查看器时,我看到以下结果:

When I run the fusion log viewer I see the following result:

https://pastebin.com/aCVZn3EB

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) ***

推荐答案

您是否要使用要求不同CLR版本的EXE加载.NET 4程序集?这需要强制使用CLR 4的app.exe.config文件.

Are you trying to load a .NET 4 assembly with an EXE that asked for a diferrent CLR version? That requires an app.exe.config file that forces CLR 4 to be used.

还请检查他是否安装了相同版本的.NET.

Also please check the he has the same version of .NET installed.

这篇关于无法使用IIS Express在VS2017中加载文件或程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆