the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container in VS2022

Sunny Sharma 1 Reputation point
2023-03-24T14:39:48.4166667+00:00

I recently installed Visual Studio 2022 Professional edition on my machine windows 2010. I'm just trying to create a sample windows form project and trying to open the designer / form by double clicking on Form1.cs and I'm getting this weird error message:

"the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container"

I have even tried uninstalling and reinstalling VS 2022 number of times but no use.

It would be really great if someone can help me out in fixing this.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,344 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,576 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,199 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 47,711 Reputation points
    2023-03-24T15:14:28.5366667+00:00

    There is no Windows 2010. Do you mean you're running on Windows 10?

    The error does seem to indicate a bad install. But this has been an issue for years. The problem generally stems from too many entries in the GAC for System.Design. Some people say compiling the code first solves the issue while others says to delete the .vs hidden folder in the project. These seem circumstantial to me.

    Someone from MS said to run gacutil /l System.Design. You should get 1 entry for .NET 2.0 and one entry for .NET 4.0, both targeting MSIL. If you get any extra entries then they will cause an issue. Remove them from the GAC using gacutil /u <fullassemblyname>. Ensure you use the full name which includes the version and platform. If that doesn't work then go to the GAC on your machine and remove the file manually. Be sure you are not in the GAC_MSIL folder as these versions you want to keep.


  2. Bruce (SqlWork.com) 54,866 Reputation points
    2023-03-24T15:40:26.8266667+00:00

    windows 2010 is not a supported platform.

    0 comments No comments