Could not load file or assembly in VS2017 with IIS express

女生的网名这么多〃 提交于 2019-12-05 05:55:17

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.

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

1- Close Visual Studio

2- Delete all files from "C:\WINDOWS\Microsoft.NET\Framework......\Temporary ASP.NET"

3- Open VS

4- Rebuild then run

I have the same issue, its random. Just install missing package via Nuget for that project. Open Package Manager Console and type:

PM> Install-Package System.ServiceModel.Activities

and go on installing packages till there is no more error: then stop.

Turns out with the help of Fusion Log I found 1 file that was 0kb in size: C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll

I restored the file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.ServiceModel.Activities.dll and it worked again!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!