App.config and C# Projects (Updated)


Everytime I add a app.config file to a new C# App, it never does what I want. I want the app.config file to be deployed to the build directory so I can make changes to the app.config file and have it propogated. With the release of VS.NET 2003, us C# developers now have pre and post build steps. So I now have to remember to add the following to the post-build event:


xcopy /s $(ProjectDir)app.config $(TargetPath).config

I know I could write an "Add New Item" to make it happen, but I just haven't had the time. I just wish MS had done it for me.

UPDATE

Chris Sells has alerted me to the fact that if your project has a app.config file, VS.NET 200X will copy it and rename it for you. My bad. I could have sworn that I tried this before and it didn't work : (




Application Name WilderBlog Environment Name Production
Application Ver 2.0.0.0 Runtime Framework .NETCoreApp,Version=v2.0
App Path D:\home\site\wwwroot\ Runtime Version .NET Core 4.6.00001.0
Operating System Microsoft Windows 6.2.9200 Runtime Arch X86