diff --git a/eng/Versions.props b/eng/Versions.props
index bb7a9a0e7202f..efa3d1be8afc3 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -22,7 +22,7 @@
3.3.3-beta1.21105.3
6.0.0-rc1.21366.2
1.1.1-beta1.22081.4
- 0.1.124-beta
+ 0.1.127-beta
4.0.1
16.10.230
diff --git a/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/ShellInProcess.cs b/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/ShellInProcess.cs
index 2ff1364699281..4d53d48932271 100644
--- a/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/ShellInProcess.cs
+++ b/src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/ShellInProcess.cs
@@ -2,71 +2,20 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.UnitTests;
-using Microsoft.VisualStudio.Editor;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Threading;
using IAsyncDisposable = System.IAsyncDisposable;
-using IOleCommandTarget = Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget;
-using OLECMDEXECOPT = Microsoft.VisualStudio.OLE.Interop.OLECMDEXECOPT;
namespace Microsoft.VisualStudio.Extensibility.Testing
{
internal partial class ShellInProcess
{
- public async Task<(Guid commandGroup, uint commandId)> PrepareCommandAsync(string command, CancellationToken cancellationToken)
- {
- await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
-
- var commandWindow = await GetRequiredGlobalServiceAsync(cancellationToken);
- var result = new PREPARECOMMANDRESULT[1];
- ErrorHandler.ThrowOnFailure(commandWindow.PrepareCommand(command, out var commandGroup, out var commandId, out var cmdArg, result));
-
- if (cmdArg != IntPtr.Zero)
- {
- throw new NotSupportedException("Unable to create a disposable wrapper for command arguments (VARIANT).");
- }
-
- return (commandGroup, commandId);
- }
-
- public async Task ExecuteCommandAsync(string command, CancellationToken cancellationToken)
- {
- await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
-
- var (commandGuid, commandId) = await PrepareCommandAsync(command, cancellationToken);
- await ExecuteCommandAsync(commandGuid, commandId, cancellationToken);
- }
-
- public Task ExecuteCommandAsync(TEnum command, CancellationToken cancellationToken)
- where TEnum : struct, Enum
- {
- var commandGuid = command switch
- {
- EditorConstants.EditorCommandID => EditorConstants.EditorCommandSet,
- _ => typeof(TEnum).GUID,
- };
-
- return ExecuteCommandAsync(commandGuid, Convert.ToUInt32(command), cancellationToken);
- }
-
- public Task ExecuteCommandAsync((Guid commandGuid, uint commandId) command, CancellationToken cancellationToken)
- => ExecuteCommandAsync(command.commandGuid, command.commandId, cancellationToken);
-
- public async Task ExecuteCommandAsync(Guid commandGuid, uint commandId, CancellationToken cancellationToken)
- {
- await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
-
- var dispatcher = await TestServices.Shell.GetRequiredGlobalServiceAsync(cancellationToken);
- ErrorHandler.ThrowOnFailure(dispatcher.Exec(commandGuid, commandId, (uint)OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, IntPtr.Zero, IntPtr.Zero));
- }
-
public async Task PauseFileChangesAsync(CancellationToken cancellationToken)
{
await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
diff --git a/src/VisualStudio/IntegrationTest/New.IntegrationTests/WellKnownCommands.cs b/src/VisualStudio/IntegrationTest/New.IntegrationTests/WellKnownCommands.cs
index 45e7742dc685f..ba104e0ac500f 100644
--- a/src/VisualStudio/IntegrationTest/New.IntegrationTests/WellKnownCommands.cs
+++ b/src/VisualStudio/IntegrationTest/New.IntegrationTests/WellKnownCommands.cs
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-using System;
+using System.ComponentModel.Design;
using Microsoft.VisualStudio;
namespace Roslyn.VisualStudio.IntegrationTests
@@ -11,7 +11,7 @@ internal static class WellKnownCommands
{
public static class Edit
{
- public static readonly (Guid commandGroup, uint commandId) RemoveAndSort = (VSConstants.CMDSETID.CSharpGroup_guid, 6419);
+ public static readonly CommandID RemoveAndSort = new(VSConstants.CMDSETID.CSharpGroup_guid, 6419);
}
}
}