When you right click on an ASP.NET project/Publish in Visual Studio, the release files will be created.
But if a subfolder has a config file, they won't be included in the final release.
e.g.
Root/Web.config // this will be included by default
Root/Admin/Web.Config // this won't be included by default
Is there an开发者_如何学JAVAy way to tell Visual Studio to include the config file of a subfolder in the published result?
Thanks
Mark its CopyToOutputDirectory
property to Always or If newer
Assuming this is a web application project (not a web site), just click on the file in the solution explorer, and press F4 to show the properties (if they aren't already showing). Make sure "Copy to Output Directory" is something other than "Do not copy" (i.e. "Copy if newer" or "Copy always"), and... that's it.
精彩评论