How to fix the "Failed to load the file or assembly" Microsoft.VisualStudio.Web "error in Visual Studio 2015?

I am working on a project while the project is working fine.

But after reinstalling Visual Studio, my project does not load.

Providing this error:

D: \ UOSGC \ Final \ Banquet_Events_System \ UI \ UI.csproj:

Error: Could not load file or assembly "Microsoft.VisualStudio.Web, Version = 14.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" or one of its dependencies. The file or directory is corrupt and unreadable. (Exception from HRESULT: 0x80070570)

Screenshot with error:

enter image description here

My operating system is Windows 10 Professional, and I am using Visual Studio 2015.


Edit: when I create a new project, it does not create it and does not show this error:

File or directory damaged and unreadable

enter image description here

Any help would be appreciated!

+5
source share
8 answers

Such an error may occur if you install visual studio again and try to open an existing project from a control source or local machine. I encountered the same problem a couple of times, I used Clear MEF Component Cache to fix this problem.

Clear MEF component extension in visual studio clears the MEF cache on disk and allows Visual Studio to rebuild it. The reason for clearing the MEF cache is because it can become damaged. This usually happens when installing or updating extensions or other components of Visual Studio. If the error still persists, check the compatibility of your project, for example, x64 / x86, otherwise save as any processor.

Steps:

  • Install an extended cache extension of the MEF component from the market or from the visual studio. Click here; MEF component

  • After installation, go to Tools β†’ Clear MEF Component Cache and click OK.

  • He will restart the visual studio. If the error still persists, check compatibility with your processor.
+1
source

You tried to open the project in administrator mode.

+1
source

Since you cannot create a new web project, you are likely to have a problem with visual studios. Of course, it’s best for you to completely remove and reinstall Visual Studio. If the problem persists, it may happen that Microsoft.VisualStudio.Web is corrupted in the GAC.

If you can replace it with a known good copy that is worth a try. I'm not sure that uninstalling and installing all versions of the .NET Framework will have corrupted files in the GAC, but it might be worth a try, since you don’t know for sure which files are bad, and if someone is bad they may have others.

Good luck

Update: GAC - Global Assembly Cache. This is part of the windows.

Here is a stackoverflow question regarding build updates in the GAC.

GAC Build Update

+1
source

I do not think that what you are experiencing is related to Visual Studio. This is a file system problem. Is drive D a USB drive?

The drive is damaged. You need to fix this with a utility like chkdsk :

 chkdsk /fd: 

If this does not fix the problem. Copy the solution to another drive and try again.

0
source

According to the message, it is damaged.
The only thing you can probably do is copy all your code into a new project.
otherwise you could try to delete the damaged file and recreate it (see this link for more information)
Corrupted .sln VS file?
This probably happened because you shut down your computer in the wrong way.

I hope this works.

0
source

You have files that are damaged, as the error says. Follow these steps to resolve the issue:

  • Uninstall Visual Studio 2015. If the uninstallation fails or you cannot uninstall it correctly from the control panel, try searching here for some tips.
  • Scan your computer for viruses. For example, there are many free scanners such as Malwarebytes .
  • Reinstall Visual Studio 2015 using the default settings
  • Try creating a project and see if it works.
  • If you still get errors in the damaged files, it may be the Windows shell itself. In this case, back up the files, format the hard drive, and reinstall Windows.
  • If you still have problems, another thing that may be wrong is the faulty hard drive. Try replacing the hard drive, reinstalling Windows, and reinstall Visual Studio 2015.

Hope that one of these steps will work.

0
source

I assume that you have finished corrupting one of the dll s provided by .net. it is simply related to your project, and this will be a problem when trying to create a new solution. I would recommend you follow the steps below

0
source

If you have 2 or more VS installed, and u uninstall one of the versions, it may accidentally remove the dependencies.

You can try to repair VS2015 and see if this helps.

0
source

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


All Articles