Publish in Visual Studio.
“Remove additional files at destination” option
Remove additional files at destination
The most common and easiest way to resolve this error is to re-publish your code, but with the options to “Remove additional files at destination” turned on. This will ensure that Visual Studio’s web deploy process will delete all existing files from the Web App before copying over the new code files. This will result in only the necessary files being published will exist in the Web App file system after the publish has completed. It also ensures that all files are overwritten with the newest versions; in case that may be interfering somehow as well.
To enable the Remove additional files at destination setting, click Edit on the Publish Profile within Visual Studio.
The setting is located on the Settings tab underneath the File Publish Options expandable area. Check the box to enable the feature, then click Save.
Comments