azureazure-web-app-servicevscode-extensions

Where is Files folder(which shows up in Azure Resources(App Services) in VS code extension) located in Kudu in App services?


the problem which I am facing is that, I can see files under Files folder of Azure Services(Linux server) in Azure Resources in VS Code. It includes .env file, .gitignore and many more. I had added .env in gitignore but not sure why it got uploaded in the first place.

Files: enter image description here

I tried deleting these files but unable to locate them.

I tried deleting everything under wwwroot, see below but I guess that did not helped much- removing files under wwwroot:

enter image description here

but the problem is it was never there and I still have no idea where it is stored exactly. Tried all the paths in bash


Solution

  • The Files folder you see in the Azure Resources view in the VS Code extension shows the contents of the /home/site/wwwroot directory on the Linux-based Azure App Service.

    To delete the .env and .gitignore files, go to the App Service > Development Tools > Advanced Tools (Kudu) > Go.

    Open the Debug console Bash and run the below commands.

    rm /home/site/wwwroot/.env
    
    rm /home/site/wwwroot/.gitignore
    

    enter image description here

    You can also delete the .env and .gitignore files from Kudu's File Manager under /hom/site/wwwroot by clicking on the wrong button as shown below.

    ```

    https://<webappName>.scm.eastus-01.azurewebsites.net/newui/fileManager#

    ```

    enter image description here

    The .env and .gitignore files were deleted successfully.

    enter image description here