This project is a Visual Studio Add In that will enhance the feature set found in the IDE by enabling users to automatically convert valid XML to the corresponding LINQ to XML statements. The Express versions of Visual Studio do not support Add Ins.

After building, copy the PasteXmlAsLinq.dll and PasteXmlAsLinq.Addin files to a directory that you may need to create called:

..Documents\Visual Studio 2008\Addins

You will may need to restart the environment after copying the files.

To see the AddIn in action, you will need to select some XML and paste it into a C# source file. In particular, go to the Edit menu and there should be a menu item called Paste XML as XElement. Note that the item will not appear in the menu unless something is in the clipboard.

Here is a tiny bit of XML to use as a sample:

<mynode></mynode>

The result of pasting this in should look like this:

XElement xml = new XElement("mynode", "");

Many of the LINQ samples require XML files and/or the version of the Northwind sample database that is located in the Data sample. If you install the Data sample under the same parent folder as the other LINQ samples, then the path for the XML files and database file will be resolved automatically. Many of the sample files also require the ObjectDumper project.