Image

Adding Visual Studio support for map files

Modified: Thursday, 11 June 2009 02:59 PM by rsimmons - Categorized as: Feature Guide

Table of Contents [Hide/Show]


Edit

Summary

Nvigorate provides some support for creating XML map files in Visual Studio. Specifically, there is a template available in the New File Dialog and an XSD for intellisense and validation.


Edit

New Mapping File Template

A Visual Studio template for binding files exists in the MapSupport directory of the source code repository. Download the bindingmap_csharp.zip file and copy to the user item template directory.

In Vista this is located at \Documents\Visual Studio 2008\Templates\ItemTemplates\Visual C#\Data.

After installing this, you will see Nvigorate Binding Map in the My Templates section of the Add New Item dialog.

Selecting this will create a .binding xml file that can be used to configure a map.


Edit

XSD support

By referencing the XSD file in a mapping file, you can be sure that you are producing a valid mapping file. In addition, Visual Studio will produce XML intellisense consistent with the schema. You can access the nvigorate-mapping.xsd in the MapSupport directory in the source code repository.

There are two ways to consume this file. In the properties window, you can add the xsd to the schemas property. Or, you can associate the schema with all .binding files. To do this, you need to locate the catalog.xml file at <VSInstallDir>\Xml\Schemas ...

and add this association entry ...


<Association extension="binding" schema="%InstallRoot%/xml/schemas/nvigorate-mapping.xsd" />

ScrewTurn Wiki version 2.0.36. Some of the icons created by FamFamFam.



Sharp Learning Curve Ahead

↑ Grab this Headline Animator