Moses Yap
:-) A happy IT Guy

Getting Intellisense for web.config/app.config in Visual Studio 2008 (Spring.NET as example)

August 7, 2008 09:09 by moses.yap

This is based on extending Visual Studio 2008’s intellisense system through XML Schemas.  The step by step guide below is specific for Spring.NET but it should also work for other packages as long as a valid XML Schema exist.

For Spring.NET:

1.  Open your Visual Studio 2008 project and open to the web.config or app.config

image

2. Click on the Schemas property under the Properties Window and select the schema that comes with Spring.NET.  The schemas are in the doc/schema directory of the distribution.  Search for xsd if you are having problems finding it.  It would be good to copy these files into the Visual Studio schema directory although its optional.  The Visual Studio schema directory is roughly in <program files dir>\Microsoft Visual Studio 9.0\Common7\Packages\schemas\xml. 

 

Note on the image below, the XML schema would not be on this list until we add it using the Add… button.  Also, in the image, the “Use” is set to

image

3. Once the schema is added to the Schemas property, add the namespace to the Spring.NET objects tag.

In the example below, note the xmlns attribute on the objects tag.

<objects xmlns="http://www.springframework.net" >

Here is a screen shot of the intellisense.

image


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: Visual Studio
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

January 5. 2009 13:44