VS 2008: Importing XML Namespaces at the project level

While working on a NIEM parser library I found that you can import XML namespaces at the project level.  Previously I posted about doing this at the top of your .VB class file:

Imports <xmlns:nc="http://niem.gov/niem/niem-core/2.0">

That allows you to use the prefix nc: in LINQ queries to work with NIEM documents.  Well today I discovered you can add those at the project level.  Right click your project and go to properties.  In the properties window go to references.  Near the bottom you can type / paste your name space in (leave out the imports statement of course) and then click add user reference.  Voila!  You can now use that in any class in your project.

Import XML namespaces at the project level

 

Print | posted on Thursday, January 31, 2008 7:15 AM

Feedback

# re: VS 2008: Importing XML Namespaces at the project level

left by Dave Horne at 2/17/2009 12:26 PM Gravatar
Any idea how to do this in a c# project?
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: