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!!)