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
Azure Functions v2 (.Net Standard) project application DLL is getting locked and subsequent publish fails despite adding app_offline file #135
Comments
Observing this same behavior on some publish attempts.
Manually restarting the function application from the Azure portal does succeed in releasing the lock. Additionally, I do have some publish attempts that succeed. |
@vijayrkn, is this something you could look into? This issue is also detailed in this stack overflow post: https://stackoverflow.com/questions/48329974/azure-function-publish-fails-with-message-web-deploy-cannot-modify-the-file-on/48349856#48349856 |
The same thing: VS2017 15.5.4, Azure Functions and Web Jobs Tools 15.0.40108.0 |
Same here, n.b. this is publishing to a regular app service plan (basic tier), not consumption plan |
From the stackoverflow article linked above (thanks @mhoeger) I was able to resolve my issue by adding MSDEPLOY_RENAME_LOCKED_FILES=1 to the application settings of my publish profile within visual studio. https://github.com/projectkudu/kudu/wiki/Dealing-with-locked-files-during-deployment |
I went through this locked files issue more than one year ago. On 2 March 2017, @davidebbo confirmed that setting
And today this exact same issue is back on the v2 runtime? Setting |
This is still occurring today for me. Our team would love to be able to use Azure Functions in production, but having to stop the function, wait a while, and try to publish again (retrying several times if it does not succeed, even then it sometimes not working) makes this a hard sell. We've set MSDEPLOY_RENAME_LOCKED_FILES=1, but this seems to have no effect.
|
Have you tried running from a zip package? It's a different approach that should completely solve this, and has other benefits. |
@davidebbo I'm running into the same issue with a zip package, uploading from the
This is after a previous successful 'clean' zip upload I created after manually stopping the app. |
@connor4312 you are using zipdeploy, but you are not running from the package. I know this may sound confusing, and hopefully Azure/app-service-announcements#110 clarifies that. Bottom line: set |
Ah okay, thank you! I'll give that a spin in the morning. |
Zip deploys seem to be working well so far. Thank you! |
@connor4312 Glad to hear! And we just announced that it is now GA. |
It's been more than a year since this bug was opened and it is still happening for the most basic Azure Function projects. Currently using Azure Functions v2 with .NET Core 2.1. Not great. |
@davidebbo If setting Also, the best resource I could find on how to deploy Azure Function using AzDevOps (VSTS), https://medium.com/microsoftazure/serverless-devops-and-ci-cd-part-2-b6e0a6d05530 , also doesn't mention |
@yzorg good call, I added a section there. Also adding @ahmelsayed for further comments, as I am no longer on the team. |
We can configure the appOffline rule in the publishing profile (In Solution explorer> Properties>PublishProfiles>*.pubxml). Set the EnableMSDeployAppOffline to true as below.
This setting take the app offline so the file lock is released and your app will start automatically after deploy. And there's an update in process to make the template use |
VS already sets this to true by default. Closing this ticket. |
With the default v2 Function template in VS2017 (fresh install as of yesterday), |
It is actually fixed in VS 2019. You can get the latest version here - https://visualstudio.microsoft.com/vs/preview/ For VS 2017, you will have to set it manually or use Zip Deploy. |
REPRO MACHINE: WNVM00100
REPRO ACCOUNT: fareast\v-lawu
REPRO Configuration: Win 10 x64 ENU + 15.5 (latest pre-release-build) VSE (Web + Azure workload)
INSTALL STEPS
2.Install Dev15.5 (latest pre-release-build) from \cpvsbuild\drops\VS\d15rel\products\27101.00\channels\internal\Preview\bootstrappers\fixed
\vwdbuild01\drops\WTA\AzureFunctions-Dev15-OOB.Nightly\Dev15\2017-11-02_b50\Release\Signed\VSIX\enu\Microsoft.VisualStudio.Web.AzureFunctions.vsix
REPRO STEPS
ACTUAL
Messages in Output:
EXPECTED:
Publish should work.
The text was updated successfully, but these errors were encountered: