Skip to content

Commit b5d892b

Browse files
committed
Warning-free clang-format plugin install for VS 15.0
With the new release of VS, it's required that all plugins migrate to the new VSIX manifest format. The new format is backwards compatible with all versions newer that Visual Studio 2012, so this migration effectively drops support for older versions of the IDE. It's also required that these new extensions are built with Visual Studio 2017, so unfortunately it was necessary to migrate the project and solution. Also removed COM references to EnvDTE and Microsoft.VisualStudio.TextManager.Interop from the csproj, as they seem to both be unnecessary and would trigger build warnings because of changes to GAC. Patch by Hugo Puhlmann! Differential Revision: https://reviews.llvm.org/D31740 llvm-svn: 300225
1 parent d1b6393 commit b5d892b

File tree

3 files changed

+24
-81
lines changed

3 files changed

+24
-81
lines changed

clang/tools/clang-format-vs/ClangFormat/ClangFormat.csproj

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@
5959
</PropertyGroup>
6060
<ItemGroup>
6161
<Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
62-
<HintPath>..\packages\VSSDK.DTE.7.0.3\lib\net20\envdte.dll</HintPath>
63-
<EmbedInteropTypes>False</EmbedInteropTypes>
62+
<EmbedInteropTypes>True</EmbedInteropTypes>
63+
</Reference>
64+
<Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
65+
<EmbedInteropTypes>True</EmbedInteropTypes>
6466
</Reference>
6567
<Reference Include="Microsoft.CSharp" />
6668
<Reference Include="Microsoft.VisualStudio.CoreUtility, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
@@ -116,10 +118,6 @@
116118
<HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>
117119
<Private>False</Private>
118120
</Reference>
119-
<Reference Include="Microsoft.VisualStudio.TextManager.Interop">
120-
<HintPath>..\packages\VSSDK.TextManager.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.TextManager.Interop.dll</HintPath>
121-
<Private>True</Private>
122-
</Reference>
123121
<Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124122
<Private>False</Private>
125123
</Reference>
@@ -146,42 +144,6 @@
146144
<Reference Include="WindowsBase" />
147145
</ItemGroup>
148146
<ItemGroup>
149-
<COMReference Include="EnvDTE">
150-
<Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>
151-
<VersionMajor>8</VersionMajor>
152-
<VersionMinor>0</VersionMinor>
153-
<Lcid>0</Lcid>
154-
<WrapperTool>primary</WrapperTool>
155-
<Isolated>False</Isolated>
156-
<EmbedInteropTypes>False</EmbedInteropTypes>
157-
</COMReference>
158-
<COMReference Include="EnvDTE100">
159-
<Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid>
160-
<VersionMajor>10</VersionMajor>
161-
<VersionMinor>0</VersionMinor>
162-
<Lcid>0</Lcid>
163-
<WrapperTool>primary</WrapperTool>
164-
<Isolated>False</Isolated>
165-
<EmbedInteropTypes>False</EmbedInteropTypes>
166-
</COMReference>
167-
<COMReference Include="EnvDTE80">
168-
<Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid>
169-
<VersionMajor>8</VersionMajor>
170-
<VersionMinor>0</VersionMinor>
171-
<Lcid>0</Lcid>
172-
<WrapperTool>primary</WrapperTool>
173-
<Isolated>False</Isolated>
174-
<EmbedInteropTypes>False</EmbedInteropTypes>
175-
</COMReference>
176-
<COMReference Include="EnvDTE90">
177-
<Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid>
178-
<VersionMajor>9</VersionMajor>
179-
<VersionMinor>0</VersionMinor>
180-
<Lcid>0</Lcid>
181-
<WrapperTool>primary</WrapperTool>
182-
<Isolated>False</Isolated>
183-
<EmbedInteropTypes>False</EmbedInteropTypes>
184-
</COMReference>
185147
<COMReference Include="Microsoft.VisualStudio.CommandBars">
186148
<Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>
187149
<VersionMajor>8</VersionMajor>
@@ -230,7 +192,9 @@
230192
</ItemGroup>
231193
<ItemGroup>
232194
<None Include="Key.snk" />
233-
<None Include="packages.config" />
195+
<None Include="packages.config">
196+
<SubType>Designer</SubType>
197+
</None>
234198
<None Include="source.extension.vsixmanifest">
235199
<SubType>Designer</SubType>
236200
</None>
@@ -294,4 +258,4 @@
294258
<Target Name="AfterBuild">
295259
</Target>
296260
-->
297-
</Project>
261+
</Project>

clang/tools/clang-format-vs/ClangFormat/packages.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<packages>
33
<package id="VSSDK.CoreUtility" version="10.0.4" targetFramework="net40" />
44
<package id="VSSDK.CoreUtility.10" version="10.0.4" targetFramework="net40" />
5-
<package id="VSSDK.DTE" version="7.0.3" targetFramework="net40" />
65
<package id="VSSDK.Editor" version="10.0.4" targetFramework="net40" />
76
<package id="VSSDK.Editor.10" version="10.0.4" targetFramework="net40" />
87
<package id="VSSDK.IDE" version="7.0.4" targetFramework="net40" />
Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Vsix Version="1.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
3-
<Identifier Id="20dbc914-1c7a-4992-b236-ef58b37850eb">
4-
<Name>ClangFormat</Name>
5-
<Author>LLVM</Author>
6-
<Version>@CLANG_FORMAT_VS_VERSION@</Version>
2+
<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">
3+
<Metadata>
4+
<Identity Id="20dbc914-1c7a-4992-b236-ef58b37850eb" Version="@CLANG_FORMAT_VS_VERSION@" Language="en-US" Publisher="LLVM"/>
5+
<DisplayName>ClangFormat</DisplayName>
76
<Description xml:space="preserve">A tool to format C/C++/Obj-C code.</Description>
8-
<Locale>1033</Locale>
9-
<MoreInfoUrl>http://clang.llvm.org/docs/ClangFormat.html</MoreInfoUrl>
7+
<MoreInfo>http://clang.llvm.org/docs/ClangFormat.html</MoreInfo>
108
<License>license.txt</License>
11-
<InstalledByMsi>false</InstalledByMsi>
12-
<SupportedProducts>
13-
<VisualStudio Version="10.0">
14-
<Edition>Pro</Edition>
15-
</VisualStudio>
16-
<VisualStudio Version="11.0">
17-
<Edition>Pro</Edition>
18-
</VisualStudio>
19-
<VisualStudio Version="12.0">
20-
<Edition>Pro</Edition>
21-
</VisualStudio>
22-
<VisualStudio Version="14.0">
23-
<Edition>Pro</Edition>
24-
</VisualStudio>
25-
<VisualStudio Version="15.0">
26-
<Edition>Pro</Edition>
27-
</VisualStudio>
28-
</SupportedProducts>
29-
<SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.0" />
30-
</Identifier>
31-
<References>
32-
<Reference Id="Microsoft.VisualStudio.MPF" MinVersion="10.0">
33-
<Name>Visual Studio MPF</Name>
34-
</Reference>
35-
</References>
36-
<Content>
37-
<VsPackage>|%CurrentProject%;PkgdefProjectOutputGroup|</VsPackage>
38-
</Content>
39-
</Vsix>
9+
</Metadata>
10+
<Installation InstalledByMsi="false">
11+
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0, 15.0]" />
12+
</Installation>
13+
<Dependencies>
14+
<Dependency Id="Microsoft.VisualStudio.MPF" MinVersion="11.0" DisplayName="Visual Studio MPF" />
15+
</Dependencies>
16+
<Prerequisites>
17+
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[11.0,)" DisplayName="Visual Studio core editor" />
18+
</Prerequisites>
19+
</PackageManifest>

0 commit comments

Comments
 (0)