title: How to use XDocument to read csproj files?
body: <p>I wanted to make some path changes to csproj files to configure for source control. Rather than do it by hand I figured Id iterate over the csproj files and use Linq-to-Xml within each csproj to alter the build and reference paths according to need.</p>
  
  <p>So Ive looked around and am presently trying to use:</p>
  
  <pre><code>public void Read(string  fileName)
  {
      XDocument doc = XDocument.Load(fileName);
  
      foreach (XElement el in doc.Root.Elements())
      {
          Console.WriteLine("{0} {1}", el.Name, el.Attribute("id").Value);
          Console.WriteLine("  Attributes:");
          foreach (XAttribute attr in el.Attributes())
              Console.WriteLine("    {0}", attr);
          Console.WriteLine("  Elements:");
  
          foreach (XElement element in el.Elements())
              Console.WriteLine("    {0}: {1}", element.Name, element.Value);
      }
  }
  </code></pre>
  
  <p>as per accepted answer of this SO question <a href="https://stackoverflow.com/questions/5604330/xml-parsing-read-a-simple-xml-file-and-retrieve-values">xml-parsing-read-a-simple-xml-file-and-retrieve-values</a>.
  However when the line </p>
  
  <pre><code>foreach (XElement el in doc.Root.Elements())
  </code></pre>
  
  <p>is processed I get a null reference error on the call to Elements. I've also tried calling Nodes, Descendants, etc but they are all null. doc. doc.Root does return everything in the proj file (except the namespace line at the top), so there is something there I'm just not walking it properly.</p>
  
  <p>So what am I doing wrong? I expected Elements to return a collection of XML fragment I could walk or filter to pull out the pieces I want i.e.  </p>
  
  <pre><code>&lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "&gt;
  </code></pre>
  
  <p>Update:</p>
  
  <p>So this is a csproj example:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;PropertyGroup&gt;
      &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt;
      &lt;Platform Condition=" '$(Platform)' == '' "&gt;AnyCPU&lt;/Platform&gt;
      &lt;ProductVersion&gt;8.0.30703&lt;/ProductVersion&gt;
      &lt;SchemaVersion&gt;2.0&lt;/SchemaVersion&gt;
      &lt;ProjectGuid&gt;{2CCAB46D-7A7C-4C65-B6D2-DC2D4049FCD9}&lt;/ProjectGuid&gt;
      &lt;OutputType&gt;Library&lt;/OutputType&gt;
      &lt;AppDesignerFolder&gt;Properties&lt;/AppDesignerFolder&gt;
      &lt;RootNamespace&gt;Basd.Core&lt;/RootNamespace&gt;
      &lt;AssemblyName&gt;Basd.Core&lt;/AssemblyName&gt;
      &lt;TargetFrameworkVersion&gt;v4.0&lt;/TargetFrameworkVersion&gt;
      &lt;FileAlignment&gt;512&lt;/FileAlignment&gt;
      &lt;TargetFrameworkProfile&gt;
      &lt;/TargetFrameworkProfile&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "&gt;
      &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;
      &lt;DebugType&gt;full&lt;/DebugType&gt;
      &lt;Optimize&gt;false&lt;/Optimize&gt;
      &lt;OutputPath&gt;..\..\Basd.Bin\AnyCPU\Release\&lt;/OutputPath&gt;
      &lt;DefineConstants&gt;DEBUG;TRACE&lt;/DefineConstants&gt;
      &lt;ErrorReport&gt;prompt&lt;/ErrorReport&gt;
      &lt;WarningLevel&gt;4&lt;/WarningLevel&gt;
      &lt;PlatformTarget&gt;AnyCPU&lt;/PlatformTarget&gt;
      &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "&gt;
      &lt;DebugType&gt;pdbonly&lt;/DebugType&gt;
      &lt;Optimize&gt;true&lt;/Optimize&gt;
      &lt;OutputPath&gt;..\..\Basd.Bin\AnyCPU\Release\&lt;/OutputPath&gt;
      &lt;DefineConstants&gt;TRACE&lt;/DefineConstants&gt;
      &lt;ErrorReport&gt;prompt&lt;/ErrorReport&gt;
      &lt;WarningLevel&gt;4&lt;/WarningLevel&gt;
      &lt;PlatformTarget&gt;AnyCPU&lt;/PlatformTarget&gt;
      &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"&gt;
      &lt;PlatformTarget&gt;x86&lt;/PlatformTarget&gt;
      &lt;OutputPath&gt;..\..\Basd.Bin\x86\Debug\&lt;/OutputPath&gt;
      &lt;DebugType&gt;full&lt;/DebugType&gt;
      &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"&gt;
      &lt;PlatformTarget&gt;AnyCPU&lt;/PlatformTarget&gt;
      &lt;OutputPath&gt;..\..\Basd.Bin\AnyCPU\Release\&lt;/OutputPath&gt;
      &lt;DefineConstants&gt;
      &lt;/DefineConstants&gt;
      &lt;DebugType&gt;pdbonly&lt;/DebugType&gt;
      &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;
      &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Reference Include="Microsoft.VisualBasic" /&gt;
      &lt;Reference Include="System" /&gt;
      &lt;Reference Include="System.Configuration" /&gt;
      &lt;Reference Include="System.Core" /&gt;
      &lt;Reference Include="System.Xml.Linq" /&gt;
      &lt;Reference Include="System.Data.DataSetExtensions" /&gt;
      &lt;Reference Include="Microsoft.CSharp" /&gt;
      &lt;Reference Include="System.Data" /&gt;
      &lt;Reference Include="System.Xml" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Compile Include="Activation\ActivationExtensions.cs" /&gt;
      &lt;Compile Include="Activation\ActivationMetaDataList.cs" /&gt;
      &lt;Compile Include="Activation\ActivationProviderFactory.cs" /&gt;
      &lt;Compile Include="Activation\ActivationMetaDataConfigurationProvider.cs" /&gt;
      &lt;Compile Include="Activation\ActivationMetaDataConfigurationProviderSection.cs" /&gt;
      &lt;Compile Include="Activation\ActivationMetaDataProvider.cs" /&gt;
      &lt;Compile Include="Activation\IActivationMetaData.cs" /&gt;
      &lt;Compile Include="Activation\ActivationMetaData.cs" /&gt;
      &lt;Compile Include="Activation\IActivationMetaDataProvider.cs" /&gt;
      &lt;Compile Include="Collections\DomainList.cs" /&gt;
      &lt;Compile Include="DateTime\GenerationDateRange.cs" /&gt;
      &lt;Compile Include="DateTime\DateBlitterExtensions.cs" /&gt;
      &lt;Compile Include="Dto\DTOStub.generic.cs" /&gt;
      &lt;Compile Include="Dto\Tabulation.cs" /&gt;
      &lt;Compile Include="Dto\TabulatedItem.cs" /&gt;
      &lt;Compile Include="Dto\DTOStub.cs" /&gt;
      &lt;Compile Include="Environment\EnvironmentContext.cs" /&gt;
      &lt;Compile Include="Events\Delegates.cs" /&gt;
      &lt;Compile Include="Activation\ActivationHelper.cs" /&gt;
      &lt;Compile Include="Helpers\ObjectScrubber.cs" /&gt;
      &lt;Compile Include="Helpers\SmtpHelper.cs" /&gt;
      &lt;Compile Include="Interfaces\INameHolder.cs" /&gt;
      &lt;Compile Include="Interfaces\IFrame.cs" /&gt;
      &lt;Compile Include="Events\FrameEventArgs.cs" /&gt;
      &lt;Compile Include="Events\PayloadedEventArgs.cs" /&gt;
      &lt;Compile Include="Helpers\DateHelper.cs" /&gt;
      &lt;Compile Include="Helpers\EnumerableDataSources.cs" /&gt;
      &lt;Compile Include="Helpers\EnumHelper.cs" /&gt;
      &lt;Compile Include="Helpers\StringsHelper.cs" /&gt;
      &lt;Compile Include="Interfaces\IIndexable.cs" /&gt;
      &lt;Compile Include="Interfaces\INameable.cs" /&gt;
      &lt;Compile Include="Collections\NamedList.cs" /&gt;
      &lt;Compile Include="Interfaces\IText.cs" /&gt;
      &lt;Compile Include="Events\KeyChangedEventArgs.cs" /&gt;
      &lt;Compile Include="DateTime\DateRange.cs" /&gt;
      &lt;Compile Include="DateTime\EntityDateRange.cs"&gt;
        &lt;SubType&gt;Code&lt;/SubType&gt;
      &lt;/Compile&gt;
      &lt;Compile Include="DateTime\IMinimumBoundedDateRange.cs" /&gt;
      &lt;Compile Include="DateTime\IDateRange.cs" /&gt;
      &lt;Compile Include="Enumerations.cs" /&gt;
      &lt;Compile Include="DateTime\IEntityDateRange.cs" /&gt;
      &lt;Compile Include="Interfaces\IUserNotifier.cs" /&gt;
      &lt;Compile Include="Collections\IXtendedEnumerable.cs" /&gt;
      &lt;Compile Include="Membership.cs" /&gt;
      &lt;Compile Include="DateTime\MinimumBoundedDateRange.cs" /&gt;
      &lt;Compile Include="Properties\AssemblyInfo.cs" /&gt;
      &lt;Compile Include="Properties\Resources.Designer.cs"&gt;
        &lt;AutoGen&gt;True&lt;/AutoGen&gt;
        &lt;DesignTime&gt;True&lt;/DesignTime&gt;
        &lt;DependentUpon&gt;Resources.resx&lt;/DependentUpon&gt;
      &lt;/Compile&gt;
      &lt;Compile Include="SeriesCube.cs" /&gt;
      &lt;Compile Include="Collections\XList.cs" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Folder Include="Compression\" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;EmbeddedResource Include="Properties\Resources.resx"&gt;
        &lt;Generator&gt;ResXFileCodeGenerator&lt;/Generator&gt;
        &lt;LastGenOutput&gt;Resources.Designer.cs&lt;/LastGenOutput&gt;
      &lt;/EmbeddedResource&gt;
    &lt;/ItemGroup&gt;
    &lt;Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /&gt;
    &lt;!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
         Other similar extension points exist, see Microsoft.Common.targets.
    &lt;Target Name="BeforeBuild"&gt;
    &lt;/Target&gt;
    &lt;Target Name="AfterBuild"&gt;
    &lt;/Target&gt;
    --&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>From Intermediate Window with breakpoint set on </p>
  
  <pre><code> foreach (XElement el in doc.Root.Elements())
  
  ?doc.Root.ToString(); "&lt;Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"&gt;\r\n  &lt;PropertyGroup&gt;\r\n    &lt;Configuration Condition=\" '$(Configuration)'
  == '' \"&gt;Debug&lt;/Configuration&gt;\r\n    &lt;Platform Condition=\" '$(Platform)' == '' \"&gt;AnyCPU&lt;/Platform&gt;\r\n    &lt;ProductVersion&gt;8.0.30703&lt;/ProductVersion&gt;\r\n    &lt;SchemaVersion&gt;2.0&lt;/SchemaVersion&gt;\r\n    &lt;ProjectGuid&gt;{2CCAB46D-7A7C-4C65-B6D2-DC2D4049FCD9}&lt;/ProjectGuid&gt;\r\n  &lt;OutputType&gt;Library&lt;/OutputType&gt;\r\n    &lt;AppDesignerFolder&gt;Properties&lt;/AppDesignerFolder&gt;\r\n    &lt;RootNamespace&gt;Basd.Core&lt;/RootNamespace&gt;\r\n    &lt;AssemblyName&gt;Basd.Core&lt;/AssemblyName&gt;\r\n    &lt;TargetFrameworkVersion&gt;v4.0&lt;/TargetFrameworkVersion&gt;\r\n    &lt;FileAlignment&gt;512&lt;/FileAlignment&gt;\r\n    &lt;TargetFrameworkProfile&gt;&lt;/TargetFrameworkProfile&gt;\r\n  &lt;/PropertyGroup&gt;\r\n  &lt;PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \"&gt;\r\n    &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;\r\n    &lt;DebugType&gt;full&lt;/DebugType&gt;\r\n    &lt;Optimize&gt;false&lt;/Optim ize&gt;\r\n    &lt;OutputPath&gt;..\\..\\Basd.Bin\\AnyCPU\\Release\\&lt;/OutputPath&gt;\r\n    &lt;DefineConstants&gt;DEBUG;TRACE&lt;/DefineConstants&gt;\r\n    &lt;ErrorReport&gt;prompt&lt;/ErrorReport&gt;\r\n    &lt;WarningLevel&gt;4&lt;/WarningLevel&gt;\r\n    &lt;PlatformTarget&gt;AnyCPU&lt;/PlatformTarget&gt;\r\n    &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;\r\n  &lt;/PropertyGroup&gt;\r\n  &lt;PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \"&gt;\r\n    &lt;DebugType&gt;pdbonly&lt;/DebugType&gt;\r\n    &lt;Optimize&gt;true&lt;/Optimize&gt;\r\n    &lt;OutputPath&gt;..\\..\\Basd.Bin\\AnyCPU\\Release\\&lt;/OutputPath&gt;\r\n    &lt;DefineConstants&gt;TRACE&lt;/DefineConstants&gt;\r\n    &lt;ErrorReport&gt;prompt&lt;/ErrorReport&gt;\r\n    &lt;WarningLevel&gt;4&lt;/WarningLevel&gt;\r\n    &lt;PlatformTarget&gt;AnyCPU&lt;/PlatformTarget&gt;\r\n    &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;\r\n  &lt;/PropertyGroup&gt;\r\n  &lt;PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Debug|x86'\"&gt;\r\n    &lt;PlatformTarget&gt;x86&lt;/PlatformTarget&gt;\r\n    &lt;OutputPath&gt;..\\..\\Basd.Bin\\x86\\Debug\\&lt;/OutputPath&gt;\r\n    &lt;DebugType&gt;full&lt;/DebugType&gt;\r\n    &lt;Prefer32Bit&gt;fals e&lt;/Prefer32Bit&gt;\r\n  &lt;/PropertyGroup&gt;\r\n  &lt;PropertyGroup Condition=\"'$(Configuration)|$(Platform)' == 'Release|x86'\"&gt;\r\n    &lt;PlatformTarget&gt;AnyCPU&lt;/PlatformTarget&gt;\r\n    &lt;OutputPath&gt;..\\..\\Basd.Bin\\AnyCPU\\Release\\&lt;/OutputPath&gt;\r\n    &lt;DefineConstants&gt;&lt;/DefineConstants&gt;\r\n    &lt;DebugType&gt;pdbonly&lt;/DebugType&gt;\r\n    &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;\r\n    &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;\r\n  &lt;/PropertyGroup&gt;\r\n  &lt;ItemGroup&gt;\r\n    &lt;Reference Include=\"Microsoft.VisualBasic\" /&gt;\r\n &lt;Reference Include=\"System\" /&gt;\r\n    &lt;Reference Include=\"System.Configuration\" /&gt;\r\n    &lt;Reference Include=\"System.Core\" /&gt;\r\n    &lt;Reference Include=\"System.Xml.Linq\" /&gt;\r\n    &lt;Reference Include=\"System.Data.DataSetExtensions\" /&gt;\r\n    &lt;Reference Include=\"Microsoft.CSharp\" /&gt;\r\n    &lt;Reference Include=\"System.Data\" /&gt;\r\n    &lt;Reference Include=\"System.Xml\" /&gt;\r\n  &lt;/ItemGroup&gt;\r\n  &lt;ItemGroup&gt;\r\n    &lt;Compile Include=\"Activation\\ActivationExtensions.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\Act ivationMetaDataList.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\ActivationProviderFactory.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\ActivationMetaDataConfigurationProvider.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\ActivationMetaDataConfigurationProviderSection.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\ActivationMetaDataProvider.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\IActivationMetaData.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\ActivationMetaData.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\IActivationMetaDataProvider.cs\" /&gt;\r\n &lt;Compile Include=\"Collections\\DomainList.cs\" /&gt;\r\n    &lt;Compile Include=\"DateTime\\GenerationDateRange.cs\" /&gt;\r\n    &lt;Compile Include=\"DateTime\\DateBlitterExtensions.cs\" /&gt;\r\n    &lt;Compile Include=\"Dto\\DTOStub.generic.cs\" /&gt;\r\n    &lt;Compile Include=\"Dto\\Tabulation.cs\" /&gt;\r\n    &lt;Compile Include=\"Dto\\TabulatedItem.cs\" /&gt;\r\n    &lt;Compile Include=\"Dto\\DTOStub.cs\" /&gt;\r\n    &lt;Compile Include=\"Environment\\EnvironmentContext.cs\" /&gt;\r\n    &lt;C ompile Include=\"Events\\Delegates.cs\" /&gt;\r\n    &lt;Compile Include=\"Activation\\ActivationHelper.cs\" /&gt;\r\n    &lt;Compile Include=\"Helpers\\ObjectScrubber.cs\" /&gt;\r\n    &lt;Compile Include=\"Helpers\\SmtpHelper.cs\" /&gt;\r\n    &lt;Compile Include=\"Interfaces\\INameHolder.cs\" /&gt;\r\n    &lt;Compile Include=\"Interfaces\\IFrame.cs\" /&gt;\r\n    &lt;Compile Include=\"Events\\FrameEventArgs.cs\" /&gt;\r\n    &lt;Compile Include=\"Events\\PayloadedEventArgs.cs\" /&gt;\r\n    &lt;Compile Include=\"Helpers\\DateHelper.cs\" /&gt;\r\n    &lt;Compile Include=\"Helpers\\EnumerableDataSources.cs\" /&gt;\r\n    &lt;Compile Include=\"Helpers\\EnumHelper.cs\" /&gt;\r\n    &lt;Compile Include=\"Helpers\\StringsHelper.cs\" /&gt;\r\n    &lt;Compile Include=\"Interfaces\\IIndexable.cs\" /&gt;\r\n    &lt;Compile Include=\"Interfaces\\INameable.cs\" /&gt;\r\n    &lt;Compile Include=\"Collections\\NamedList.cs\" /&gt;\r\n    &lt;Compile Include=\"Interfaces\\IText.cs\" /&gt;\r\n    &lt;Compile Include=\"Events\\KeyChangedEventArgs.cs\" /&gt;\r\n    &lt;Compile Include=\"DateTime\\DateRange.cs\" /&gt;\r\n    &lt;Co mpile Include=\"DateTime\\EntityDateRange.cs\"&gt;\r\n      &lt;SubType&gt;Code&lt;/SubType&gt;\r\n    &lt;/Compile&gt;\r\n    &lt;Compile Include=\"DateTime\\IMinimumBoundedDateRange.cs\" /&gt;\r\n    &lt;Compile Include=\"DateTime\\IDateRange.cs\" /&gt;\r\n    &lt;Compile Include=\"Enumerations.cs\" /&gt;\r\n    &lt;Compile Include=\"DateTime\\IEntityDateRange.cs\" /&gt;\r\n    &lt;Compile Include=\"Interfaces\\IUserNotifier.cs\" /&gt;\r\n    &lt;Compile Include=\"Collections\\IXtendedEnumerable.cs\" /&gt;\r\n    &lt;Compile Include=\"Membership.cs\" /&gt;\r\n    &lt;Compile Include=\"DateTime\\MinimumBoundedDateRange.cs\" /&gt;\r\n    &lt;Compile Include=\"Properties\\AssemblyInfo.cs\" /&gt;\r\n    &lt;Compile Include=\"Properties\\Resources.Designer.cs\"&gt;\r\n      &lt;AutoGen&gt;True&lt;/AutoGen&gt;\r\n      &lt;DesignTime&gt;True&lt;/DesignTime&gt;\r\n     &lt;DependentUpon&gt;Resources.resx&lt;/DependentUpon&gt;\r\n    &lt;/Compile&gt;\r\n    &lt;Compile Include=\"SeriesCube.cs\" /&gt;\r\n    &lt;Compile Include=\"Collections\\XList.cs\" /&gt;\r\n  &lt;/ItemGroup&gt;\r\n  &lt;ItemGroup&gt;\r\n    &lt;Folder Include=\"Compression\\\" /&gt;\r\n  &lt;/Item Group&gt;\r\n  &lt;ItemGroup&gt;\r\n    &lt;EmbeddedResource Include=\"Properties\\Resources.resx\"&gt;\r\n      &lt;Generator&gt;ResXFileCodeGenerator&lt;/Generator&gt;\r\n      &lt;LastGenOutput&gt;Resources.Designer.cs&lt;/LastGenOutput&gt;\r\n    &lt;/EmbeddedResource&gt;\r\n  &lt;/ItemGroup&gt;\r\n  &lt;Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" /&gt;\r\n  &lt;!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r\n       Other similar extension points exist, see Microsoft.Common.targets.\r\n  &lt;Target Name=\"BeforeBuild\"&gt;\r\n  &lt;/Target&gt;\r\n  &lt;Target Name=\"AfterBuild\"&gt;\r\n  &lt;/Target&gt;\r\n  --&gt;\r\n&lt;/Project&gt;" 
  
  ?doc.Root.Name; {{http://schemas.microsoft.com/developer/msbuild/2003}Project}
          hashCode: 541551665
          localName: "Project"
          LocalName: "Project"
          Namespace: {http://schemas.microsoft.com/developer/msbuild/2003}
          NamespaceName: "http://schemas.microsoft.com/developer/msbuild/2003"
          ns: {http://schemas.microsoft.com/developer/msbuild/2003} 
  
  
  ?doc.Root.Descendants(); {System.Xml.Linq.XContainer.GetDescendants}
          name: null
          self: false
          System.Collections.Generic.IEnumerator&lt;System.Xml.Linq.XElement&gt;.Current: null
          System.Collections.IEnumerator.Current: null ?doc.Root.Nodes(); {System.Xml.Linq.XContainer.Nodes}
          System.Collections.Generic.IEnumerator&lt;System.Xml.Linq.XNode&gt;.Current: null
          System.Collections.IEnumerator.Current: null ?doc.Root.Attributes();
  </code></pre>