<None Include="Resources\Images_32bit.bmp" />\r
</ItemGroup>\r
<ItemGroup>\r
+ <Content Include="clang-format.exe">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ </Content>\r
<Content Include="Resources\Package.ico" />\r
</ItemGroup>\r
<ItemGroup>\r
using System.ComponentModel;\r
using System.ComponentModel.Design;\r
using System.IO;\r
+using System.Reflection;\r
using System.Runtime.InteropServices;\r
using System.Xml.Linq;\r
\r
/// </summary>\r
private string RunClangFormat(string text, int offset, int length, string path)\r
{\r
+ string vsixPath = Path.GetDirectoryName(Uri.UnescapeDataString(\r
+ new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));\r
+\r
System.Diagnostics.Process process = new System.Diagnostics.Process();\r
process.StartInfo.UseShellExecute = false;\r
- process.StartInfo.FileName = "clang-format.exe";\r
+ process.StartInfo.FileName = vsixPath + "\\clang-format.exe";\r
// Poor man's escaping - this will not work when quotes are already escaped\r
// in the input (but we don't need more).\r
string style = GetStyle().Replace("\"", "\\\"");\r
- Visual Studio 2012 Professional\r
- Visual Studio 2010 Professional\r
- Visual Studio 2010 SDK.\r
+\r
+clang-format.exe must be copied into the ClangFormat/ directory before building.\r
+It will be bundled into the .vsix file.\r