]> granicus.if.org Git - clang/commitdiff
Warning-free clang-format plugin install for VS 15.0
authorHans Wennborg <hans@hanshq.net>
Thu, 13 Apr 2017 17:42:45 +0000 (17:42 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 13 Apr 2017 17:42:45 +0000 (17:42 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300225 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-format-vs/ClangFormat/ClangFormat.csproj
tools/clang-format-vs/ClangFormat/packages.config
tools/clang-format-vs/source.extension.vsixmanifest.in

index db34a689d5d302035b973e59a98e6b9ff4385125..c83c413a565b1aee7cdd52e20c19be068c72d23f 100644 (file)
   </PropertyGroup>\r
   <ItemGroup>\r
     <Reference Include="envdte, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
-      <HintPath>..\packages\VSSDK.DTE.7.0.3\lib\net20\envdte.dll</HintPath>\r
-      <EmbedInteropTypes>False</EmbedInteropTypes>\r
+      <EmbedInteropTypes>True</EmbedInteropTypes>\r
+    </Reference>\r
+    <Reference Include="envdte80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+      <EmbedInteropTypes>True</EmbedInteropTypes>\r
     </Reference>\r
     <Reference Include="Microsoft.CSharp" />\r
     <Reference Include="Microsoft.VisualStudio.CoreUtility, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">\r
       <HintPath>..\packages\VSSDK.Text.10.0.4\lib\net40\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>\r
       <Private>False</Private>\r
     </Reference>\r
-    <Reference Include="Microsoft.VisualStudio.TextManager.Interop">\r
-      <HintPath>..\packages\VSSDK.TextManager.Interop.7.0.4\lib\net20\Microsoft.VisualStudio.TextManager.Interop.dll</HintPath>\r
-      <Private>True</Private>\r
-    </Reference>\r
     <Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
       <Private>False</Private>\r
     </Reference>\r
     <Reference Include="WindowsBase" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <COMReference Include="EnvDTE">\r
-      <Guid>{80CC9F66-E7D8-4DDD-85B6-D9E6CD0E93E2}</Guid>\r
-      <VersionMajor>8</VersionMajor>\r
-      <VersionMinor>0</VersionMinor>\r
-      <Lcid>0</Lcid>\r
-      <WrapperTool>primary</WrapperTool>\r
-      <Isolated>False</Isolated>\r
-      <EmbedInteropTypes>False</EmbedInteropTypes>\r
-    </COMReference>\r
-    <COMReference Include="EnvDTE100">\r
-      <Guid>{26AD1324-4B7C-44BC-84F8-B86AED45729F}</Guid>\r
-      <VersionMajor>10</VersionMajor>\r
-      <VersionMinor>0</VersionMinor>\r
-      <Lcid>0</Lcid>\r
-      <WrapperTool>primary</WrapperTool>\r
-      <Isolated>False</Isolated>\r
-      <EmbedInteropTypes>False</EmbedInteropTypes>\r
-    </COMReference>\r
-    <COMReference Include="EnvDTE80">\r
-      <Guid>{1A31287A-4D7D-413E-8E32-3B374931BD89}</Guid>\r
-      <VersionMajor>8</VersionMajor>\r
-      <VersionMinor>0</VersionMinor>\r
-      <Lcid>0</Lcid>\r
-      <WrapperTool>primary</WrapperTool>\r
-      <Isolated>False</Isolated>\r
-      <EmbedInteropTypes>False</EmbedInteropTypes>\r
-    </COMReference>\r
-    <COMReference Include="EnvDTE90">\r
-      <Guid>{2CE2370E-D744-4936-A090-3FFFE667B0E1}</Guid>\r
-      <VersionMajor>9</VersionMajor>\r
-      <VersionMinor>0</VersionMinor>\r
-      <Lcid>0</Lcid>\r
-      <WrapperTool>primary</WrapperTool>\r
-      <Isolated>False</Isolated>\r
-      <EmbedInteropTypes>False</EmbedInteropTypes>\r
-    </COMReference>\r
     <COMReference Include="Microsoft.VisualStudio.CommandBars">\r
       <Guid>{1CBA492E-7263-47BB-87FE-639000619B15}</Guid>\r
       <VersionMajor>8</VersionMajor>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <None Include="Key.snk" />\r
-    <None Include="packages.config" />\r
+    <None Include="packages.config">\r
+      <SubType>Designer</SubType>\r
+    </None>\r
     <None Include="source.extension.vsixmanifest">\r
       <SubType>Designer</SubType>\r
     </None>\r
   <Target Name="AfterBuild">\r
   </Target>\r
   -->\r
-</Project>
\ No newline at end of file
+</Project>\r
index 38f64ed3a615f45aee7ba76c7cb5f0148b9a843e..07dc281178f590d8750e0b3dcdf9c2c665d88d50 100644 (file)
@@ -2,7 +2,6 @@
 <packages>
   <package id="VSSDK.CoreUtility" version="10.0.4" targetFramework="net40" />
   <package id="VSSDK.CoreUtility.10" version="10.0.4" targetFramework="net40" />
-  <package id="VSSDK.DTE" version="7.0.3" targetFramework="net40" />
   <package id="VSSDK.Editor" version="10.0.4" targetFramework="net40" />
   <package id="VSSDK.Editor.10" version="10.0.4" targetFramework="net40" />
   <package id="VSSDK.IDE" version="7.0.4" targetFramework="net40" />
index 55440e1426b399fb8b3c13cbddfbd4457d0a9d88..c0545e68716afc9726c0955c953147b43cbd3e34 100644 (file)
@@ -1,39 +1,19 @@
 <?xml version="1.0" encoding="utf-8"?>\r
-<Vsix Version="1.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">\r
-  <Identifier Id="20dbc914-1c7a-4992-b236-ef58b37850eb">\r
-    <Name>ClangFormat</Name>\r
-    <Author>LLVM</Author>\r
-    <Version>@CLANG_FORMAT_VS_VERSION@</Version>\r
+<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">\r
+  <Metadata>\r
+    <Identity Id="20dbc914-1c7a-4992-b236-ef58b37850eb" Version="@CLANG_FORMAT_VS_VERSION@" Language="en-US" Publisher="LLVM"/>\r
+    <DisplayName>ClangFormat</DisplayName>\r
     <Description xml:space="preserve">A tool to format C/C++/Obj-C code.</Description>\r
-    <Locale>1033</Locale>\r
-    <MoreInfoUrl>http://clang.llvm.org/docs/ClangFormat.html</MoreInfoUrl>\r
+    <MoreInfo>http://clang.llvm.org/docs/ClangFormat.html</MoreInfo>\r
     <License>license.txt</License>\r
-    <InstalledByMsi>false</InstalledByMsi>\r
-    <SupportedProducts>\r
-      <VisualStudio Version="10.0">\r
-        <Edition>Pro</Edition>\r
-      </VisualStudio>\r
-      <VisualStudio Version="11.0">\r
-        <Edition>Pro</Edition>\r
-      </VisualStudio>\r
-      <VisualStudio Version="12.0">\r
-        <Edition>Pro</Edition>\r
-      </VisualStudio>\r
-      <VisualStudio Version="14.0">\r
-        <Edition>Pro</Edition>\r
-      </VisualStudio>\r
-      <VisualStudio Version="15.0">\r
-        <Edition>Pro</Edition>\r
-      </VisualStudio>\r
-    </SupportedProducts>\r
-    <SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.0" />\r
-  </Identifier>\r
-  <References>\r
-        <Reference Id="Microsoft.VisualStudio.MPF" MinVersion="10.0">\r
-            <Name>Visual Studio MPF</Name>\r
-        </Reference>\r
-  </References>\r
-  <Content>\r
-    <VsPackage>|%CurrentProject%;PkgdefProjectOutputGroup|</VsPackage>\r
-  </Content>\r
-</Vsix>\r
+  </Metadata>\r
+  <Installation InstalledByMsi="false">\r
+    <InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[11.0, 15.0]" />\r
+  </Installation>\r
+  <Dependencies>\r
+    <Dependency Id="Microsoft.VisualStudio.MPF" MinVersion="11.0" DisplayName="Visual Studio MPF" />\r
+  </Dependencies>\r
+  <Prerequisites>\r
+    <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[11.0,)" DisplayName="Visual Studio core editor" />\r
+  </Prerequisites>\r
+</PackageManifest>\r