title: SharePoint CSOM cannot initialize ServerRelativePath
body: <p>Good day all,</p>
  
  <p>I'm working with c# and the SharePoint CSOM for SharePoint Online.  My code works with files in a specific library where I loop through a collection of File object:  foreach (Microsoft.SharePoint.Client.File xFile in ParentFolder.Files) { ....</p>
  
  <p>I'm not able to initialize the ServerRelativePath property.</p>
  
  <pre><code>            foreach (Microsoft.SharePoint.Client.File xFile in ParentFolder.Files)
              {
                  Console.WriteLine(xFile.Name);
  
                  //xFile.Context.Load(zzzzzz);
                  xFile.Context.Load(xFile.ListItemAllFields);
                  xFile.Context.Load(xFile.ModifiedBy);
                  xFile.Context.ExecuteQuery();
  
                  Console.WriteLine(xFile.ServerRelativePath);  //Error here
  
                  More code ...
  
              }
  </code></pre>
  
  <p>The error I'm getting is the normal "The property or field 'ServerRelativePath' has not been initialized..."</p>
  
  <p>However, I'm not able to load anything into the context that allows me to get past this error.</p>
  
  <p>What am I missing?</p>
  
  <p>Many thanks
  Christoff</p>