title: FileInfo compact framework 3.5 - cannot find file
body: <p>I am using the FileInfo class. However, the file info cannot find the file.</p>
  
  <p>The file is called log4Net.config and I have added it to my project. I have set the properties to build action = 'Content' and copy output = 'copy always'</p>
  
  <p>When I run the following code:</p>
  
  <pre><code> FileInfo logfileInfo = new FileInfo("Log4Net.config");
  
   if (!logfileInfo.Exists)
   {
       Console.WriteLine("Cannot find file: " + logfileInfo.FullName);
       return; 
   }
   else
   {
       XmlConfigurator.Configure(logfileInfo);
   }
  </code></pre>
  
  <p>Exists is always false. The exception is: Could not find file 'Log4Net.config'.</p>
  
  <p>I have checked on my PDA and the Log4Net.config has been copied the PDA and is in the same directory as the executable. So not sure why it cannot find it.</p>
  
  <p>Just some extra info the configure method expects a FileInfo as a parameter.</p>
  
  <p>Am I doing something wrong.</p>
  
  <p>Many thanks for any advice,</p>
  
  <p>Steve</p>