Visual Studio: Could not load file or asembly "System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" or one of its dependencies. The module was expected to contain an assembly manifest.

KeithVanEaton-0729 1 Reputation point
2022-05-10T03:18:11.103+00:00

Greetings,

I have recently downloaded and installed the latest VS 2022 for Win10. When I try to connect to my TFS repo via Team Explorer - Connect I receive this error (see pic):
Could not load file or assembly "System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" or one of its dependencies. The module was expected to contain an assembly manifest.

200494-systemwebserviceerror.png

Historically, I have had VS 2019 and it worked fine until last week when I started to receive this System.Web.Services error when trying to compile and when trying to Get Latest.

I have seen a few help pages, but none of them are helpful for my scenario.

What do I need to do?

Many thanks for any help!

Keith

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,677 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 27,796 Reputation points Microsoft Vendor
    2022-05-20T07:04:12.487+00:00

    Hi Keith,

    I forgot to say that you can try to repair the latest .NET Framework which is installed on your machine. To confirm which latest version of .NET Framework you have installed, you can refer to this doc: Detect .NET Framework 4.5 and later versions, and press Windows key + R > type regedit > navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full and then match the Release REG_DWORD value. After that use netfxrepairtool.exe and command like netfxrepairtool.exe /q /r .NETxx and wait for it to finish repairing the .NET Framework.

    Besides, I think you can go to Tools > Options > Source Control > Current source control plug-in and check if you have selected Visual Studio Team Foundation Server option.

    Also, please try to clean some local cache for TFS/VS/Projects. TFS cache is stored in C:\Users\[username]\AppData\Local\Microsoft\Team Foundation\X.0\Cache folder(back up it before removing it). VS 2022 cache is stored in C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\17.0_XXXXX\ComponentModelCache folder.

    BTW, you can also try to repair VS from VS Installer and reset VS settings if it is possible for you.

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  2. ABDULLAH AL FAHAD 1 Reputation point
    2022-10-15T15:15:22.52+00:00

    is it still unsolved?

    I have this similar issue while adding Entity framework on my MVC 5 project

    0 comments No comments