Deploying ASP.net Core 2.0 to Azure

The accepted answer did not fix the problem for me.

Steps Required:

Launch Azure Console within the app and delete the contents of the wwwroot folder then redeploy.

RMDIR wwwroot /S /Q

Also, if you have installed the Application Insights Extension within your app. When the app starts you will receive an exception stating that it can't be found.

To fix this error reinstall the Application Insights Extension from the Extensions blade and restart the app.

The problem with the wwwroot folder is that the old Core 1.1 files are not overwritten. Removing the contents of the directory resolves the problem.


I had the same problem, which was caused by files leftover from a previous .NET Core 1.1 deployment. The easiest way to fix this is to check the "Remove additional files at destination" under the File Publish Options in your Publish Settings when publishing to Azure from VS.

File Publish Options