RSS

Querying Properties within csproj files using XML

20 Jul

Another short and sweet post.  As part of the project I’m currently working on, I needed to use the value stored in the RootNamespace Node within the Project file (.csproj).

Now as a csproj file is essentially an XML document we can use the XML libraries in Visual studio to obtain the values we are after.

Heres the code I used to return the value from the RootNamespace Element.  (Note: Remember to set the Namespace!!)

 

Querying a csproj file

 

 

Advertisements
 
Leave a comment

Posted by on July 20, 2011 in C#, XML

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: