Martin Noreke's comment is correct:
The publication will compile and pop out of the Release assembly, but after that it will not reset.
Conversely, if you publish using a profile that has a debug configuration when you select Release, Visual Studio switches to Debug.
This only happens if you use the Web Click Once Publish toolbar.
If you publish using the Publish Web dialog, Visual Studio does not switch the configuration. You can open this dialog by clicking the button next to the publish button on the toolbar or by right-clicking your project and clicking "Publish ...".
Change This seems to be fixed in Visual Studio 2017.
Ruud lenders
source share