Skip to content

Commit 1c65665

Browse files
author
Ramon Viladomat
committed
VS2017 support
1 parent a70e4a8 commit 1c65665

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

StructLayout/LayoutWindow/LayoutWindowCommand.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,13 @@ public static async Task InitializeAsync(AsyncPackage package)
8686
/// <param name="e">The event args.</param>
8787
private void Execute(object sender, EventArgs e)
8888
{
89-
this.package.JoinableTaskFactory.RunAsync(async delegate
89+
ThreadHelper.ThrowIfNotOnUIThread();
90+
91+
LayoutWindow win = EditorUtils.GetLayoutWindow(true);
92+
if (win != null)
9093
{
91-
ToolWindowPane window = await this.package.ShowToolWindowAsync(typeof(LayoutWindow), 0, true, this.package.DisposalToken);
92-
if ((null == window) || (null == window.Frame))
93-
{
94-
throw new NotSupportedException("Cannot create tool window");
95-
}
96-
});
94+
EditorUtils.FocusWindow(win);
95+
}
9796
}
9897
}
9998
}

StructLayout/StructLayout.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@
116116
<Reference Include="WindowsBase" />
117117
</ItemGroup>
118118
<ItemGroup>
119-
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="16.0.205" ExcludeAssets="runtime" />
120-
<PackageReference Include="Microsoft.VSSDK.BuildTools" Version="16.6.2051" />
119+
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="15.0.1" ExcludeAssets="runtime" />
121120
</ItemGroup>
122121
<ItemGroup>
123122
<Page Include="Editor\ParseMessageControl.xaml">

StructLayout/source.extension.vsixmanifest

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="StructLayout.ae9caa76-a538-4c6c-bff5-9e0a61e6b728" Version="0.4.4" Language="en-US" Publisher="Ramon Viladomat" />
4+
<Identity Id="StructLayout.ae9caa76-a538-4c6c-bff5-9e0a61e6b728" Version="0.4.5" Language="en-US" Publisher="Ramon Viladomat" />
55
<DisplayName>Struct Layout</DisplayName>
66
<Description xml:space="preserve">C++ struct memory layout viewer</Description>
77
<MoreInfo>https://github.com/Viladoman/StructLayout</MoreInfo>
@@ -10,13 +10,13 @@
1010
<Tags>cpp memory struct class debugging cache cacheline layout</Tags>
1111
</Metadata>
1212
<Installation>
13-
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[16.0, 17.0)" />
13+
<InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[15.0, 17.0)" />
1414
</Installation>
1515
<Dependencies>
1616
<Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />
1717
</Dependencies>
1818
<Prerequisites>
19-
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[16.0,17.0)" DisplayName="Visual Studio core editor" />
19+
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,17.0)" DisplayName="Visual Studio core editor" />
2020
</Prerequisites>
2121
<Assets>
2222
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />

0 commit comments

Comments
 (0)