I am following this guide to create and deploy a web app on Azure. I am using VSCode and when I am trying to deploy via VSCode I get the following error:
Failed to deploy path that does not exist:
MyFirstAzureWebApp/bin/Release/net5.0/publish
My resource group and plan and web service are all created just fine, but if I look in the "MyFirstAzureWebApp/bin" directory there are no "Release" directory only a "Debug" directory.
Why is this and how can I fix it?
Thank you
Søren
CodePudding user response:
I have tried with two web apps in VS Code and observed the issue:
Release folder will be added to the bin when adding config file during deployment to Azure Web App Service. I followed the below steps:
Open Vs Code > Create a folder 'MyAzureFirstWebApp' > Open Terminal > Run the below command:
dotnet new webapp -f net5.0
Then next command
dotnet run
and got some files in bin folder but no release folder created.Next, I have Created the App Service Plan and Web App Service in the Azure Portal.
- In the VS Code, Install Azure Extension and Select that Azure Icon from the left index, where you will see your Subscriptions, resource groups, app services, functions etc.
Select Your subscription, resource group and then app service you create just now.
- Click on deploy option. It will ask you "Add Config to your current project" click on add and then immediately you'll get the release folder.
Below screenshot shows you the added release folder while adding config to the project:
This is my second web app This is my first web app:
And the deployed successfully and the