Hacking Copy As HTML plugin to work with Visual Studio 2012

Posted : Friday, 04 January 2013 09:32:00

As part of my daily work I often want to copy a section of code and preserve the formatting etc. this is particularly true when writing this blog. For previous versions of Visual Studio I have found the following plug-in to be immensely useful:


Its great – it adds the option “Copy As HTML…” to the source code context menu


Currently this plug in has not been updated to work with Visual Studio 2012 but its quite easy to hack it to work properly until it gets updated….

1) Install the latest version which will add it to VS2010…

2) Create a directory called “Addins” in the following location <CURRENT_USER>\Documents\Visual Studio 2012

3) Open <CURRENT_USER>\Documents\Visual Studio 2010\Addins in windows explorer.

4) Copy the following files “CopySourceAsHtml.AddIn” and “JTLeigh.Tools.Development.CopySourceAsHtml.dll” into the the directory you created in step 2)

5) Finally open the VS2012 version of CopySourceAsHtml.AddIn and update all occurrences of “<Version>10.0</Version>” to “<Version>11.0</Version>”

And that’s all you need to make it work

UPDATE : 2013-10-08

Support has now been added to extension gallery...


...so you dont even have to do this anymore :-)

  • (This will not appear on the site)