VS will generate (and override) a web.config file as part of publishing to IIS. I have various items I need to include in the file (like extending the file upload max size l
I finally got back to this and wound up using a transform:
Create a web.release.config file in the root of the project
Set that file's properties to Build Action = None so it doesn't get copied directly to the destination folder
Use the transformation syntax to define the sections that need to be inserted: