Skip to content
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

[Visual Studio] Deleting a function in VS project doesn't delete it Azure Functions App #564

Closed
gitsparty opened this issue Oct 24, 2017 · 8 comments

Comments

@gitsparty
Copy link

Visual Studio 2017 Version 15.4

Repro steps -

  1. Create a Functions project, add couple of Azure Functions and publish it to Azure.
  2. Delete one of the Functions, and re-publish the project to Azure.

The deleted function is not deleted in the Azure Functions App

@gitsparty
Copy link
Author

To add insult to injury, the portal is in read only mode when I publish functions from visual studio. It won't let me remove the function in the portal.

@gitsparty gitsparty changed the title [Visual Stuido] Deleting a function in VS project doesn't delete it Azure Functions App [Visual Studio] Deleting a function in VS project doesn't delete it Azure Functions App Oct 25, 2017
@justcla
Copy link
Contributor

justcla commented Oct 25, 2017

When you publish from Visual Studio, there is an option in the settings of the publish configuration profile that let's you "Remove additional files at destination".
If you check that, it should remove the old function when it does the next publish.

See Issue #555

@jeffhollan jeffhollan added this to the Visual Studio Triage milestone Oct 28, 2017
@ahmelsayed ahmelsayed added the FAQ label Nov 14, 2017
@eralston
Copy link

When using Build & Release in VSTS, is there an analogous setting for deleting the target app service's files? I have this same issue in my CI/CD pipeline, but it happens w/o the publish profile, so I cannot use the stated workaround.

@eralston
Copy link

The answer is YES! You have those exact options under "Additional Deployment Options" when using the "Azure App Service Deploy" action in VSTS...

sketch

The more you know 👍

@Dan-cws
Copy link

Dan-cws commented Dec 12, 2017

What about local? If I delete a function and run Iocally get "The function type name [delete func} is invalid". Same with rename

@bjohndev
Copy link

Has there been any resolution for this? I don't see these settings in VSTS.

@spacem
Copy link

spacem commented Aug 15, 2018

It seems this is only for version 1 of the "Azure App Service Deploy" task so if you use a newer version you don't get this option.

edit:
Well that is no good since v1 is broken
microsoft/azure-pipelines-tasks#2348

@jeevacodepro
Copy link

Not there is a bug in the build task but found a work around. Switch to the version 4 of the task and in the deployment option select zip deploy. Then switch to version 3 of the task which then exposed those addition deployment options to clean the existing files before deployment. Hope it helps others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants