Failed to load file or assembly "..." or one of its dependencies. The file or directory is corrupt and unreadable. From VS15 Comunity to Professional

I am working on a webforms project (3 levels) in the Visual Studio 2015 community.

I transferred the project from one laptop to another, and now the project is not running.

Note. Another laptop has Visual Studio Professional 2015.

Displays a blue underline under the first line of all pages as follows:

enter image description here

And this error:

enter image description here

I am using Windows 10 Professional.

Any help would be appreciated!

+1
source share
1 answer

This error has nothing to do with your project. The Microsoft.VisualStudio.Web.PageInspector.Loader file is part of Visual Studio. Did the new laptop have different versions of Visual Studio (e.g. 2012) that were removed? The simplest solution is to completely remove all versions of Visual Studio, restart the computer, and then install the version you need (for example, the Visual Studio 2015 community).

In addition, you will have to fix it yourself. To do this, you need to modify the web.config file of the machine in the following folders:

C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Config \ web.config C: \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ Config \ web.config

Open the web.config file in a text editor and find all the links to Microsoft.VisualStudio.Web.PageInspector.Loader and delete them. Then restart Visual Studio and run the project.

Another option is to modify the web.config file in your project. This is not recommended, but it will work. Add the lines below:

 <compilation> <assemblies> <remove assembly="Microsoft.VisualStudio.Web.PageInspector.Loader, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </assemblies> </compilation> 
+1
source

Source: https://habr.com/ru/post/1272981/


All Articles