Skip to content

Commit d4587e1

Browse files
committed
fix VS2022 bug DTE vs DTE2
1 parent 900ae4c commit d4587e1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

SharedProject/Impl/Logger.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
using System.Linq;
33
using FineCodeCoverage;
44
using System.Diagnostics;
5-
using Microsoft.VisualStudio;
65
using System.Collections.Generic;
76
using Microsoft.VisualStudio.Shell;
87
using System.Diagnostics.CodeAnalysis;
98
using Microsoft.VisualStudio.Shell.Interop;
109
using System.ComponentModel.Composition;
1110
using Microsoft;
12-
using EnvDTE;
1311
using Task = System.Threading.Tasks.Task;
12+
using EnvDTE80;
1413

1514
interface IShowFCCOutputPane
1615
{
@@ -22,7 +21,7 @@ public class Logger : ILogger, IShowFCCOutputPane
2221
{
2322
private IVsOutputWindowPane _pane;
2423
private IVsOutputWindow _outputWindow;
25-
private DTE dte;
24+
private DTE2 dte;
2625
private readonly IServiceProvider _serviceProvider;
2726
private Guid fccPaneGuid = Guid.Parse("3B3C775A-0050-445D-9022-0230957805B2");
2827

@@ -43,7 +42,7 @@ private void SetPane()
4342
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
4443
_outputWindow = (IVsOutputWindow)_serviceProvider.GetService(typeof(SVsOutputWindow));
4544
Assumes.Present(_outputWindow);
46-
dte = (EnvDTE.DTE)_serviceProvider.GetService(typeof(EnvDTE.DTE));
45+
dte = (DTE2)_serviceProvider.GetService(typeof(EnvDTE.DTE));
4746
Assumes.Present(dte);
4847

4948
// Create a new pane.

0 commit comments

Comments
 (0)