Publish project process seems broken

IDE: Visual Studio 2019 4.8.04161
Version: Elements
Target ASP.NET
Description: Publish process seems to have broken between and

Expected Behavior:
Choosing Build…Publish should place final files in destination folder

Actual Behavior:
Debug vs Release is not being correctly detected. For example if you set to ‘Release’ you can see the ‘Debug’ option being used to compile (so temporary files are created in the debug folder). When it then finally copies files they come from the temporary release folder which is empty (and so no files are copied).


  1. Main menu ‘File’ … ‘New’ … ‘Project “ASP.NET Classic Web (Rem Objects Oxygene)”’
  2. Click ‘Next’
  3. Click ‘Create’
  4. Main menu: ‘Build’…‘Publish’
  5. Select ‘Folder’ from the target options
  6. Click ‘Next’
  7. Click ‘Finish’
  8. Change option for ‘Delete existing files’ to true to make sure the problem shows up clearly
  9. Click ‘Publish’
  10. Click on the ‘Target location’ link and you should see files (correctly) in the folder
  11. Change ‘Configuration’ to ‘Debug’ and then ‘Publish’
  12. Click on the target location link and you will find that no files have been published.

In my actual project this is the other way around and I can only get ‘Debug’ to work not ‘Release’

Looking at the ‘Output’ window I can see that it is confused:

For example 'Build started: Project WebApplication1, Configuration: Debug
Yet it is incorrectly compiling into the ‘Release’ folder:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\Users\abc\source\repos\WebApplication1\obj\Release\AspnetCompileMerge\Source -u -c C:\Users\abc\source\repos\WebApplication1\obj\Release\AspnetCompileMerge\TempBuildDir

This should be the \obj\debug folder not release.

Many thanks


Logged as bugs://E25878.

bugs://E25878 was closed as fixed.