views:

265

answers:

4

I've been unable to find such an add-in for VS2010, I only found it for earlier versions.

Does anyone know where I can find a newer version?

+2  A: 

It looks like Code4Blog will do what you're looking for. I just tried it out and it seems pretty good!


Personally though, if it's an option I highly suggest you go with SyntaxHighlighter over the Html produced by this or other similar extensions because it keeps the source code more lightweight and easy to copy/paste.

Nathan Taylor
Damn page is in Chinese. When I use Google to translate it, it messes up the page and I still can't find the download link.
Velika
Got it. Baixar means "download" in Chinese.
Velika
I actually downloaded it through the extension manager instead; but yes, judging by the layout of the page I was inclined to assume the same. :)
Nathan Taylor
+1  A: 

You can install the VS2008 version of CopySourceAsHtml (from here), and then manually edit the CopySourceAsHtml.AddIn file located at C:\Users\<username>\Documents\Visual Studio 2010\Addins so that both Version elements are 10.0:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility"&gt;
  <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 2008 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>
Mitch Wheat
+1 Works for me! Thanks!
Aviad P.
+1  A: 

Be aware that if you install CopySourceAsHtml via that hack it WILL slow down your startup time by quite a bit. It works, but you may only want to enable it when you need it.

Hastarin
I've just experienced this myself. My startup time went from 30 seconds to 2 seconds after removing my hacked CopySourceAsHtml from Visual Studio.
Joel Harris
+2  A: 

You need to install the Visual Studio Productivity Power Tools, which includes just such an extension (along with many others).

Scott Dorman