Add an XML Schema file to Visual Studio

XML Schema files (.xsd) are files which provide data for IntelliSense and are often provided along with a 3rd party class library. In case you are not familiar with IntelliSense, it is a functionality that helps you develop or configure a system by providing a list of existing methods or properties which are asscoiated to the object or class you are working with.

NHibernate 3.0.0 comes with 2 such .xsd files:

  • nhibernate-configuration
  • nhibernate-mapping

That provide the tags needed for implementing and mapping NHibernate. However, in order to use them, you will need to make them accessible from Visual Studio.

Select the XML menu item and then Schemas…. I had to open an XML file before the menu item appeared in the root menu.

I modified my code to use an Action delegate and the Task class found in the Task Parallel Library. By doing this the 2 second activity was reduced to < .5 of a second.


And then select Add… within the window that you are prompted. If you are using German Visual Studio, you would select Hinzufügen…


Navigate to where you have stored your .xsd files and add them. You will then see the files added with green checks, like below:


Then select OK.

Now when you begin to configure your system, you will get a list of available settings as a drop-down. I have always found this feature helpful.


Leave a Comment

Your email address will not be published.