未验证 提交 40fbe90e 编写于 作者: D dotnet-automerge-bot 提交者: GitHub

Merge pull request #36407 from dotnet/merges/release/dev16.2-preview3-to-master

Merge release/dev16.2-preview3 to master
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Shared.TestHooks;
......@@ -138,7 +139,18 @@ End Sub
VisualStudio.Workspace.WaitForAsyncOperations(Helper.HangMitigatingTimeout, FeatureAttribute.Workspace);
VisualStudio.Debugger.Go(waitForBreakMode: true);
try
{
VisualStudio.Debugger.SetBreakPoint(module1FileName, "Dim x", charsOffset: 1);
}
catch (Exception)
{
var dev16_2_preview1 = "16.0.28917.182 D16.2";
var dev16_2_preview2 = "16.0.29006.145 D16.2";
Assert.Contains(VisualStudio.Shell.GetVersion(), new[] { dev16_2_preview1, dev16_2_preview2 });
return;
}
VisualStudio.Debugger.ExecuteStatement("Module1.Main()");
VisualStudio.Editor.ReplaceText("x = 4", "x = 42");
VisualStudio.Debugger.StepOver(waitForBreakOrEnd: true);
......
......@@ -10,6 +10,16 @@ internal class Shell_InProc : InProcComponent
{
public static Shell_InProc Create() => new Shell_InProc();
public string GetVersion()
{
return InvokeOnUIThread(cancellationToken =>
{
var shell = GetGlobalService<SVsShell, IVsShell>();
ErrorHandler.ThrowOnFailure(shell.GetProperty((int)__VSSPROPID5.VSSPROPID_ReleaseVersion, out var version));
return (string)version;
});
}
public string GetActiveWindowCaption()
=> InvokeOnUIThread(cancellationToken => GetDTE().ActiveWindow.Caption);
......
......@@ -15,6 +15,9 @@ public Shell_OutOfProc(VisualStudioInstance visualStudioInstance)
_inProc = CreateInProcComponent<Shell_InProc>(visualStudioInstance);
}
public string GetVersion()
=> _inProc.GetVersion();
public string GetActiveWindowCaption()
=> _inProc.GetActiveWindowCaption();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册