'Error while connecting to Database Server from SQL Server Management Studio

Recently, while trying to connect to any SQL Server Database from SQL Server Management Studio, I am getting an error - Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)

I tried updating to the latest version of SQL Server Management Studio but there is no change.

The full error stack is as below:

===================================

Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.ServiceProvider.GetService[T](IServiceProvider serviceProvider, Boolean throwIfNotFound)
   at Microsoft.SqlServer.Management.SqlStudio.Explorer.NavigationService.Initialize()
   at Microsoft.SqlServer.Management.SqlStudio.Explorer.NavigationService.GetView(String urnPath)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.<GetColumnsFromNavigationService>d__11.MoveNext()
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.AddFields(List`1 list, IEnumerable`1 fields, IDictionary`2 allValidFields, AddFieldsFlags flags)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.GetParentFields(INodeInformation source, Dictionary`2& allValidColumns)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, String urnQuery, Boolean registerBuilder, Boolean registerBuiltItems)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request)
   at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)

Any idea why this error is happening?



Solution 1:[1]

What helped in my case... (version 17.9.1)

I have checked file:

C:\Users\<user>\AppData\Roaming\Microsoft\AppEnv\14.0\ActivityLog.xml

In there I have found the information that the directory:

C:\Users\<user>\Documents\SQL Server Management Studio

has not been found. I have created it manually and... SSMS started working.

Yeah I know... It sounds crazy.

Solution 2:[2]

@Marek Malczewski is right, thank you sir!

I too looked at the log files and fixed it the same way, here is a screenshot for your confirmation.

enter image description here

Solution 3:[3]

Install .NET 4.8. I've had exactly the same issue and it worked for me.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marwie
Solution 2 Dung
Solution 3 Honza