IDE: Visual Studio 2019 4.8.04161
Version: Elements 18.104.22.16835
Description: Publish process seems to have broken between 22.214.171.12431 and 126.96.36.19935
Choosing Build…Publish should place final files in destination folder
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).
- Main menu ‘File’ … ‘New’ … ‘Project “ASP.NET Classic Web (Rem Objects Oxygene)”’
- Click ‘Next’
- Click ‘Create’
- Main menu: ‘Build’…‘Publish’
- Select ‘Folder’ from the target options
- Click ‘Next’
- Click ‘Finish’
- Change option for ‘Delete existing files’ to true to make sure the problem shows up clearly
- Click ‘Publish’
- Click on the ‘Target location’ link and you should see files (correctly) in the folder
- Change ‘Configuration’ to ‘Debug’ and then ‘Publish’
- 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.