CopyAsHtml in Visual Studio 2010

25 בפברואר 2010

2 comments

CopyAsHtml is an Excellent AddIn for visual studio 2008. Using it allows you to copy code from Visual Studio and paste it with all the familiar code formatting in any Office document.

The problem is that there is no release for Visual Studio 2010.

The good news are that there is a work around.

  1. Download the latest version and install in.
  2. Open the installation folder
    (e.g. \Program Files\J.T. Leigh & Associates\CopySourceAsHtml)
  3. Copy the addIn File (CopySourceAsHtml.AddIn) to the addIn direcory of VS studio
    (C:\Users\…\Documents\Visual Studio 2010\Addins).
    If such folder does not exist – Create it.
  4. Edit the addin file using an xml editor.
  5. Change the version to 10.0 and description to VS 2010

    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility">
      <HostApplication>
        <Name>Microsoft Visual Studio Macros</Name>
        <Version>10.0</Version>
      </HostApplication>
      <HostApplication>
        <Name>Microsoft Visual Studio</Name>
       <Version>10.0</Version>
      </HostApplication>
      <Addin>
        <FriendlyName>CopySourceAsHtml</FriendlyName>
        <Description>Adds support to Microsoft Visual Studio 2010 for copying source code, syntax highlighting, and line numbers as HTML.</Description>
        <Assembly>JTLeigh.Tools.Development.CopySourceAsHtml, Version=3.0.3215.1, Culture=neutral, PublicKeyToken=bb2a58bdc03d2e14, processorArchitecture=MSIL</Assembly>
        <FullClassName>JTLeigh.Tools.Development.CopySourceAsHtml.Connect</FullClassName>
        <LoadBehavior>1</LoadBehavior>
        <CommandPreload>0</CommandPreload>
        <CommandLineSafe>0</CommandLineSafe>
      </Addin>
    </Extensibility>

  6. Reset VS.
  7. Open the AddIn Manager (Under tools) and enable CopySourceAsHtml
    image
  8. Now you are ready to go!

    image

 

Manu

Add comment
facebook linkedin twitter email

כתיבת תגובה

האימייל לא יוצג באתר. (*) שדות חובה מסומנים

תגי HTML מותרים: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

2 comments

  1. Zviadi Sharadze29 במרץ 2010 ב 16:47

    Thanks! It Works!
    thanks )

    להגיב
  2. Rainer Hilmer15 באפריל 2010 ב 22:39

    Yay that's great news! I always loved this addin.

    להגיב