title: Where are config files for class libraries physically located?
body: <p>My guess is that this question will fall under the category of "duh", but, nevertheless, I'm confused.</p>
  
  <p>When using config files in, for example, a Windows Forms Application, the config file can be found in <em>C:\Program files\CompanyName\ProductName\Application.exe.config</em>. However, with the class library I'm developing I do not see a "<em>ClassLibrary.dll.config</em>" file in the install folder after installing it (in tandem with another project) from Visual Studio. Even though I do not see the file anywhere, retrieving data from it works correctly. Plus, running the following code from a method within the class library returns the path you would expect: <em>C:\Program files\CompanyName\ProductName\ClassLibrary.dll.config</em>.</p>
  
  <p>If someone could shed some light on what I'm missing here, that would be really awesome. </p>
  
  <pre><code>public static string MyMethod()
  {
  Assembly assem = Assembly.GetExecutingAssembly();
  Configuration config = ConfigurationManager.OpenExeConfiguration(assem.Location);
  
  return "The assembly location was: " + assem.Location + Environment.NewLine +
  "The config file path was: " + config.FilePath;
  
  // Gives me "C:\Program files\CompanyName\ProductName\ClassLibrary.dll.config"
  
  }
  </code></pre>