I'm having trouble trying to select a specific node from a .csproj file, which I read as an XDocument.
XDocument xmldoc = XDocument.Load("The full path of the .csproj file");
This loads the .csproj file into an XDocument without problems. I tried Descendants , Elements , etc., to try to get TheNodeIWant and its value, but I can not understand why I am not getting any results.
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <TheNodeIWant>The String I Want </TheNodeIWant> </PropertyGroup> <PropertyGroup> ....... </PropertyGroup> </Project>
How can I select TheNodeIWant and get its value?
source share