title: c# wpf FileStream and File.Copy files are not found
body: <p>I have been struggling with this for a few hours now.
  I am using     AppDomain.CurrentDomain.BaseDirectory to get the path of my Application Directory. I have some code where I use both FileStream and File.Copy to Read/Create/Copy files. This all works perfectly while in Debug mode in VS. Files get created and copied in the Bin/Debug folder.</p>
  
  <p>When I install my application on another machine or outside of VS, the code runs and does not error. However I can not find the files that are copied in their respected folders. They do not show up on File Search either. In code, the files are confirmed there by calling File.Exists. However I can't find the files in my directory at all?  What am I missing? </p>
  
  <p>The below return EXISTS in a pop up along with the File Path. However the file is not there when I look. I also have Show Hidden files checked. I think it could be something to do with the AppDir because I can hardcode a path as a string and it works. But I wont know where the application is installed when someone else takes it.</p>
  
  <pre><code>public string AppDir = AppDomain.CurrentDomain.BaseDirectory;
  
  System.IO.File.Copy(filepath, AppDir + @"Content\Images\" + filename, true);
  if(File.Exists(AppDir + @"Content\Images\" + dlg.SafeFileName) == true)
  {
     MessageBox.Show("EXISTS");
     MessageBox.Show(AppDir + @"Content\Images\" + dlg.SafeFileName);
  }
  </code></pre>
  
  <p>Thanks
  Ian</p>
  
  <p>Solution - Files were being saved in a virtual directory thus the reason I could not see them. I learned I should put the Content files into the Users Documents Folder. I was able to do that by this code</p>
  
  <pre><code>private static string AppDir = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "GameMasters") + "\\";
  </code></pre>