Skip to content

Commit 8bfdfbd

Browse files
authored
Get SVsSolution service instead of IVsSolution (#36226)
* Get SVsSolution service instead of IVsSolution * Use the correct GetService overload
1 parent 7b000d8 commit 8bfdfbd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public VisualStudioWorkspaceImpl(ExportProvider exportProvider, IAsyncServicePro
106106
_projectionBufferFactoryService = exportProvider.GetExportedValue<IProjectionBufferFactoryService>();
107107
_projectCodeModelFactory = exportProvider.GetExport<IProjectCodeModelFactory>();
108108

109-
_lazyVsSolution = new Lazy<IVsSolution>(() => exportProvider.GetExport<SVsServiceProvider>().Value.GetService<IVsSolution>());
109+
_lazyVsSolution = new Lazy<IVsSolution>(() => exportProvider.GetExport<SVsServiceProvider>().Value.GetService<IVsSolution, SVsSolution>());
110110

111111
// We fetch this lazily because VisualStudioProjectFactory depends on VisualStudioWorkspaceImpl -- we have a circularity. Since this
112112
// exists right now as a compat shim, we'll just do this.

src/VisualStudio/TestUtilities2/ProjectSystemShim/Framework/TestEnvironment.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim.Fr
158158

159159
Public Function GetService(serviceType As Type) As Object Implements System.IServiceProvider.GetService
160160
Select Case serviceType
161-
Case GetType(IVsSolution), GetType(SVsSolution)
161+
Case GetType(SVsSolution)
162162
Return VsSolutionMock
163163

164164
Case GetType(SComponentModel)

0 commit comments

Comments
 (0)