I do not need to use the publication for anything other than production. You said that you publish Debug assemblies on other servers, so my solution will not work for you, but it can work for others without this need.
You can effectively deploy the Release assembly to the publication by breaking the Web.Debug.config conversion. Any syntax error will be executed, but I prefer this change to the root tag:
<configuration_ONLY_PUBLISH_IN_RELEASE_CONFIG!! xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
When someone tries to post to Debug, they will receive an error message with this tag, indicating a solution.
Note that you can still create and run locally using the Debug assembly, rather than publish.
Jerph
source share