We all know that we should only be publishing our ASP.NET Web Applications with release build type, so why do I not get a warning when I trigger the “Publish” command in Visual Studio 2008, for a project configured to build in debug mode?
Sure, there might be cases where I need to publish a debug build to a development or test environment, but answering yes in a confirmation dialog would be acceptable in these cases. Is there an option that I have overlooked, forcing Visual Studio to warn me every time I try to publish a debug build?
Yes, we could just ban using the “Publish” command and use a more solid build management tool, but this involves a change of process and might not be an option in this particular case.
Typically things like this are handled in an automated build tool. Quite frankly, I publish to a dev site by orders of magnitude more often than I do to production.
For that reason alone having an extra dialog box in the process would be a bit maddening.
Further, even without a build system in place, most people have different config files for the different environments and for the most part handle it with a web.config setting.