0

I have a .Net core app developed using Visual Studio 2019 and deployed on Azure app service. I have function app as well in the same solution. I have to do couple of things and then redeploy to Azure app service.

  1. Add one .cshtml file
  2. Modify one .cshtml file

My question is, how to deploy the CSHTML file only to the Azure app service? Without affecting the existing functionality of application.

As per my understanding, if web app is deployed in Azure app service then the whole thing (solution) has to be deployed even though there are/is very small code modifications.

Please let me know.Thanks.

AskMe
  • 2,495
  • 8
  • 49
  • 102

2 Answers2

0

Even if you have Web App and Function App in the same solution, they should be separated units of deployment. That said, your deployment pipeline should be separately triggered for Web App and Function App.

From the technical point of view(or architecture) there's no concept of "solution". Solution(.sln) is a Visual Studio specific being and even though it's supported e.g. in VS Code, I'd never treat it as deployment unit. Especially in your scenario, when in fact two separate services are responsible for handling your code.

Even if you deploy Function App as a part of the same App Service Plan as your Web App, it's still a separate Azure service. In such a scenario they only share compute.

kamil-mrzyglod
  • 4,948
  • 1
  • 20
  • 29
  • Thanks for your comment. However, considering the UI change in the Website/ web application, could you please tell, Is there any way to deploy the single CSHTML/HTML file? I believe, that is how we do it in case of application deployed On prem/ VM. – AskMe Aug 12 '20 at 04:46
  • @AskMe - you can just use FTP deployment and deploy a single file to your application directory in Azure. – kamil-mrzyglod Aug 12 '20 at 09:46
  • Thanks for the clue. Let me try that. Will mark answer if it works. Thanks again. – AskMe Aug 13 '20 at 01:17
0

Yes its possible if you have access to kudu deployment center you can perform manual add/update information , please visit below URL:-

https://[yourAppName].scm.azurewebsites.net

You can also navigate to this site using the azure portal , once you open the app service blade you will find the kudu deployment center option in the bottom left of the menu. It will provide an online file explorer of your application hosted on the app service and from there you can migrate to relevant folder and perform add/update.

Aditya Singh
  • 137
  • 6
  • I know that Kudu console has the capability to view folder/files and Azure app service has provided the preview version of such capabilities as well. However, I’m wondering, is there any official recommendation to use these for single file deployment? Note: Most of the tutorials/recommendations says to publish the code from Visual Studio. – AskMe Aug 13 '20 at 00:55
  • There's is no official Microsoft recommended way for a single file deployment , Kudu tools were incorporated to give you access to the cloud environment where web app has been deployed.But kudu portal is being actively used for deployment by azure developers either as a single file change in response to a quick fix or complete deployment of an application zip file. – Aditya Singh Aug 13 '20 at 05:16