image

Buenas,

when I had to copy source code in HTML format from the Visual Studio 2010 IDE always used theProductivyt Power Tools . Between all the features that has the Copy as HTML I was quite useful.

Now with Visual Studio 2012 does not have any extensions to default me this functionality, but with a bit of hacking have done it.

1. Download the CopyAsSourceHtml addin from CodePlex (here ))

2. Install the AddIn

3. In the Directory installation, which by default is usually [% Program Files (x86)%\J.T. Leigh & Associates\CopySourceAsHtml\)] edit the CopySourceAsHtml.AddIn file with a text editor.

4. Change lines 5 and 9 to use Visual Studio 2012. Serious value = 11.0

   1: <?xml version="1.0" encoding="utf-8" standalone="no"?>
   2: <Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility">
   3:   <HostApplication>
   4:     <Name>Microsoft Visual Studio Macros</Name>
   5:     <Version>9.0</Version>
   6:   </HostApplication>
   7:   <HostApplication>
   8:     <Name>Microsoft Visual Studio</Name>
   9:     <Version>9.0</Version>
  10:   </HostApplication>
  11:   <Addin>
  12:     <FriendlyName>CopySourceAsHtml</FriendlyName>
  13:     <Description>Adds support to Microsoft Visual Studio 2008 for copying source code, syntax highlighting, and line numbers as HTML.</Description>
  14:     <Assembly>JTLeigh.Tools.Development.CopySourceAsHtml, Version=3.0.3215.1, Culture=neutral, PublicKeyToken=bb2a58bdc03d2e14, processorArchitecture=MSIL</Assembly>
  15:     <FullClassName>JTLeigh.Tools.Development.CopySourceAsHtml.Connect</FullClassName>
  16:     <LoadBehavior>1</LoadBehavior>
  17:     <CommandPreload>0</CommandPreload>
  18:     <CommandLineSafe>0</CommandLineSafe>
  19:   </Addin>
  20: </Extensibility>

5. As this addin was designed for Visual Studio 2008, we will have to “move” it to use it with VS2012. To do this copy the contents of the previous location of Visual Studio 2012 AddIns folder.The default is [% Program Files (x86)%\Microsoft Visual Studio 11.0\Common7\IDE\Addins\ )]]

6 From this point we can already see the AddIn in the AddIns VS2012 list

image

7. If we open a code editor, we will have the “Copy as HTML” option available.

image

8 Done!

Download: http://copysourceashtml.codeplex.com/releases/view/31129

Saludos @ Home

El Bruno

image image image

2 responses to “[#VS2012] HowTo: Copy as HTML in Visual Studio 2012”

  1. […] un tiempo escribí un post donde comentaba como podíamos copiar código en formato HTML desde el IDE de Visual Studio 2012. […]

    Like

  2. […] un tiempo escribí un post donde comentaba como podíamos copiar código en formato HTML desde el IDE de Visual Studio 2012. […]

    Like

Leave a reply to [#VS2012] HowTo: Copy as HTML en Visual Studio 2012 (II) « El Bruno Cancel reply

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading