Paste XML as Type in VS 2010

Tags: Blog

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.

  1. Download and install the WCF REST Starter Tool Kit
  2. Go to the installation folder (C:\Program Files (x86)\Microsoft WCF REST\WCF REST Starter Kit Preview 2)
  3. Unzip and compile the PasteXmlAsType project under the “WCF REST Starter Kit Preview 2.zip” file
  4. 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.
  5. To see the Add-in file path list go to

    1. Tools->Options
    2. Environment->Add-In/Macros Security item
  6. Restart Visual Studio

image

 

The Paste XML as Type menu option will show up under the Edit menu.

Hope this help

7 Comments

  • said

    <p>Pingback from NYC WCF Firestarter Content and Links - JrzyShr Dev Guy - Site Home - MSDN Blogs</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 &quot;Paste as type&quot; 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 &#171; Truncated CoDr's Blog</p>

Add a Comment