Vorleak Chy's Blog
Display .Net codes on blog with nice format
While I was trying to display nicely formatted .Net codes on my blog I found CopySourceAsHtml which is a Visual Studio plugin.
If you want to try please download and it’s installed simply. The code on your blog looks exactly like it would in Visual Studio. It also works with almost any blog which is just Html there is nothing that needs to be done on the server.
How to use it
In Visual Studio, Just select the code you want to display -> right click -> select Copy As HTML. A clean HTML representation of you code will be copied onto the clipboard which can then be pasted into your blog editor.
I like Windows Live Writer as my blog editor which I can save in local first before publish to online and there are many good plugins are available.
It supports with Visual Studio 2005 for now. So if you are using newer version which is Visual Studio 2008 then.
How to make CopySourceAsHtml works with Visual Studio 2008
Currently there is no Visual Studio 2008 version of this Add-in available to download but it is very easy way to make it works with VS 2008.
In the Addins path of VS 2005
(If you are using Window Vista it is usually in C:\Users\USERNAME\Documents\Visual Studio 2005\Addins)
You will find the following files:
- CopySourceAsHtml.dll
- CopySourceAsHtml.AddIn
- CopySourceAsHtml.dll.config
- Copy those files to the Addins path for VS 2008
- Open CopySourceAsHtml.AddIn file in a text or XML editor in the Addins folder of VS 2008
- Change as seen below and save the changed file back into the VS 2008 Addins folder.
The original file contained text <Version>8.0</Version> instead of <Version>9.0</Version><?xml version="1.0" encoding="UTF-16" standalone="no"?> <Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility"> <HostApplication> <Name>Microsoft Visual Studio Macros</Name> <Version>9.0</Version> </HostApplication> <HostApplication> <Name>Microsoft Visual Studio</Name> <Version>9.0</Version> </HostApplication> <Addin> <FriendlyName>CopySourceAsHtml</FriendlyName> <Description>Adds support to Microsoft Visual Studio 2005 for copying source code, syntax highlighting, and line numbers as HTML.</Description> <Assembly>CopySourceAsHtml.dll</Assembly> <FullClassName>JTLeigh.Tools.CopySourceAsHtml.Connect</FullClassName> <LoadBehavior>5</LoadBehavior> <CommandPreload>0</CommandPreload> <CommandLineSafe>0</CommandLineSafe> </Addin> </Extensibility> - In Visual Studio 2008 go to Tools -> Add-in-Manager -> Activate the AddIn
Now you can get CopySourceAsHtml works with Visual Studio 2008.
Subscribe-
Search-
Tags-
Categories-
Recent Comments-
- Using UUID as Primary Key in Ruby on Rails Thanks @Chamnap, I have...
- Using UUID as Primary Key in Ruby on Rails Not working. You need to...
- Installing GeoServer on Ubuntu Thanks for that! You saved me a lot...
- Change background color of TextBox or ComboBox in Windows Forms Hi....
- SQL Server 2005 Update Trigger Effect Multiple Rows Its really helpful...
- Copyright 2010 Vorleak Chy's Blog. All Rights Reserved. Powered by Wordpress | Theme designed by Chris Murphy
- Back To Top
- Home


Leave a Comment-