| By Corey Roth | Article Rating: |
|
| November 24, 2009 12:45 PM EST | Reads: |
1,105 |
I was working on my first SharePoint 2010 post today since I actually installed some bits and quickly discovered that I did not have Copy Source As Html working with Visual Studio 2010 Beta 2. If you’re a blogger like me, you will find that you are quite addicted to this useful tool as it makes pasting good looking code segments quite easy. Unfortunately, they haven’t released an installer that works with Visual Studio 2010 yet, so I decided to see if I could figure out how to get it to work. Now, I’m not expert on Visual Studio Addins, so it took me some experimenting. I installed the product as normal, but when I opened Visual Studio, I did not find the addin loaded. After some investigating, I decided to copy the CopySourceAsHtml.AddIn file into my user folder. Specifically this goes in C:\Users\<UserName>\My Documents\Visual Studio 2010\Addins. Note: the My Documents folder is actually the Documents folder if you are looking at it directly on the file system. Also to note is that the Addins folder probably will not exist so you need to create it.
After I did this, I tried opening Visual Studio again and again did not see my addin loaded. I then decided to open the file and take a look. I quickly saw something that stood out at me.
<?xml version="1.0" encoding="utf-8" 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 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>
This is version 10 of Visual Studio so I decided to increment the new two version elements as shown below.
<?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 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>
After I saved the changes, I restarted Visual Studio and sure enough the addin loaded and worked correctly. In fact I pasted the above snippets using the tool in Visual Studio 2010. If you have never used Copy Source as Html before, go check it out. It’s a handy tool for pasting code snippets.
Read the original blog entry...
Published November 24, 2009 Reads 1,105
Copyright © 2009 Ulitzer, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Corey Roth
Corey Roth is a consultant at Stonebridge specializing in SharePoint for clients in the energy sector. He has more than ten years of experience delivering solutions in the energy, travel, advertising and consumer electronics verticals.
Corey specializes in delivering ECM and search solutions to clients using SharePoint. Corey has always focused on rapid adoption of new Microsoft technologies including Visual Studio 2010, .NET Framework 4.0, and Silverlight.
He is a member of the .NET Mafia (www.dotnetmafia.com) where he blogs about the latest technology and SharePoint. He is dedicated to the community and speaks regularly at user groups and SharePoint Saturdays.
- Six Enterprise Megatrends to Watch in 2010
- How do I tweet? Let me count the ways...
- How Passionate and Excited Are You?
- Four Common Sense Social Media Tips for PR and Marketing Pros
- Cloud Computing - The New Rock n' Roll
- Survey Says: IT Budgets in 2010 To Be at 2005 Levels
- Ten Tips for Promoting your Employer with Personal Social Media
- Cloud Computing Bootcamp Returns to New York City April 20, 2010
- Google Apps Keep Adding Cool Features
- Social Media ROI
- Quick Comparison of eCommerce Platforms
- New Media on Ulitzer - Social Media Marketing Is Hot Hot Hot
- Scott Brown to Win Senate Race by a Landslide
- Six Enterprise Megatrends to Watch in 2010
- Technology Predictions for 2010
- My Personal 2010 Predictions
- Motorola Droid Review
- 2010 Annual Predictions Bonanza
- How do I tweet? Let me count the ways...
- How Passionate and Excited Are You?
- Four Common Sense Social Media Tips for PR and Marketing Pros
- Behind the Scenes, SANta Claus Global Cloud Story
- Enis Berberoğlu Named Editor-in-Chief of Hürriyet
- Newspaper and Magazine Circulations Will Get Hit Hard By "New Media" Tsunami
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology 2008 Predictions: Where's RIAs, AJAX, SOA and Virtualization Headed in 2008?
- Wal-Mart To Sell $399 Ubuntu Linux-based Laptop with Google Operating System
- Google's OpenSocial: A Technical Overview and Critique
- Analysis: Friendster, Facebook, MySpace, and Xanga.com Have Different Audiences
- Ulitzer Is Looking to Hire the Best Enterprise Software Architect Alive!
- Drupal Content Management Platform Has Been Chosen By Ulitzer
- Twenty-One Experts Define Cloud Computing
- Exclusive Q&A with Coach Wei - Chairman, Founder & CTO of Nexaweb
- Web 2.0 Is Hot in Japan...But Nobody Knows MySpace
- Working at Google vs. Working at Microsoft
- What's the Difference Between Cloud Computing and SaaS?




























Ulitzer content is offered under Creative Commons "Attribution Non-Commercial No Derivatives" License.
For any reuse or distribution, you must make clear to others the license terms of this work.
The best way to do this is with a link to this web page.
Any of the above conditions can be waived if you get written permission from Ulitzer, Inc., the copyright holder.
Nothing in this license impairs or restricts the author's moral rights.