user705414 user705414 - 1 month ago 9
C# Question

Can we autocopy the *.dll.config?

when refering to a library assembly, it is auto copied to the final bin directory. However the *.dll.config is not, is there a way to automatically copy this config file?

Answer

In Visual Studio, there's a 'properties' section when you have the active file open. For the App.config, it has a property called Copy to Output Directory, the options are

  • Do Not Copy
  • Copy if Newer
  • Copy Always

You want either the second or the third option.