Paste XML as Type in VS 2010
With the WCF REST Starter Tool Kit, we had a very cool feature called Paste XML as Type which basically allows you to copy an xml document and paste in the xml as a .Net type / class. In Visual Studio 2008 this feature is available by simply installing the the WCF REST Starter Tool Kit. In Visual Studio 2010 we have to do a bit more work to get this feature. Here are the steps needed to get the Paste XML as Type feature to work with VS 2010.
- Download and install the WCF REST Starter Tool Kit
- Go to the installation folder (C:\Program Files (x86)\Microsoft WCF REST\WCF REST Starter Kit Preview 2)
- Unzip and compile the PasteXmlAsType project under the “WCF REST Starter Kit Preview 2.zip” file
- Copy the *dll and PasteXmlAsType.AddIn files to one of the Addin folders. There are a few folders and you can also create your own. Just make sure the path is include in the “Add-In file path” list.
- Tools->Options
- Environment->Add-In/Macros Security item
- Restart Visual Studio
To see the Add-in file path list go to
The Paste XML as Type menu option will show up under the Edit menu.
Hope this help
My name is Dani Diaz. I work for Microsoft as a Developer Evangelist covering the Northern East Coast. Oh and before I forget. The opinions express on this site are my owns and not that of my employer.




7 Comments
said
<p>Pingback from NYC WCF Firestarter Content and Links - JrzyShr Dev Guy - Site Home - MSDN Blogs</p>
said
<p>Thanks, saved me some time from having to create new type on the consuming end.</p>
said
<p>Awesome!! and thank you for the Firestarter today.</p>
<p>--Avi</p>
said
<p>You are awesome. Thanks you for this. You just saved me a ton of typing. Visual Studio 2010 has Paste as Schema, but this is way more useful.</p>
said
<p>Danny,</p>
<p>Thank you for great presentation at firestart in NY.</p>
<p>Problem: When I tried to install "Paste as type" in VS2010, I was unable to open the project as per step 3 above.</p>
<p>Looks like it was created for VS 2008 and 2010 unable to handle it.</p>
<p>Please advice.</p>
<p>Alex.</p>
said
<p>This was a great help!!</p>
<p> I haven't had the opportunity to be exposed to this and would have spent some time trying to figure out how to implement this myself.</p>
<p>Thanks a lot!!!</p>
said
<p>Pingback from Paste XML As Types: Visual Studio 2010 Extension « Truncated CoDr's Blog</p>