-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publishing functions to function app from Visual Studio does not remove deleted functions #2009
Comments
Hi @codebrane, You can disable functions in the function app as mentioned in the document- https://docs.microsoft.com/en-us/azure/azure-functions/disable-function?tabs=portal#disable-a-function |
thanks for that. I've been disabling them to show they are not relevant but they don't exist so I shouldn't have to disable them. They also propagate through Azure. If I import from the function app to APIM the non existent functions are displayed as options to be imported. Is there a way to remove them entirely from the function app? Removing them from the function app in Visual Studio doesn't remove them from the function app in Azure. |
It turns out it's a VisualStudio thing. I found this issue which describes how to delete non-existent functions on publish. For VisualStudio Mac this worked for me:
and adding:
It only works if I choose that publish profile from the list otherwise using Publish to Azure overwrite the publish profile and sets SkipExtraFilesOnServer back to True and non-existent functions aren't deleted. |
After creating a function app in the Azure portal and deploying a locally developed function app in Visual Studio with one function it works as expected.
e.g. TestFunctionApp has one function called TestFunction
After Renaming TestFunction to NewFunction in VisualStudio and re-publishing to the function app in Azure, the function app has two functions:
TestFunction and NewFunction.
There are no references to TestFunction in the Visual Studio project after renaming.
Is there a way to remove non-existent functions from a function app?
The text was updated successfully, but these errors were encountered: