microsoft / vscode-azurefunctions

Azure Functions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions
MIT License
291 stars 132 forks source link

Deploy fails, bin folder contents not uploaded. However, Azure console states, Deploy to app "spravzni" succeeded #3986

Open longtimedeveloper opened 7 months ago

longtimedeveloper commented 7 months ago

Deploy fails, bin folder contents not uploaded. However, Azure console states, Deploy to app "spravzni" succeeded

I am in a war zone. I am blocked and must deploy this critical application to Azure ASAP.

  1. I was using vscode extension Azure Resources 0.8.4. After reading this response from Microsoft I uninstalled all Azure extensions and used the command line to install version 0.8.0 ms-azuretools.vscode-azureresourcegroups-0.8.0.vsix

  2. After installing 0.8.0 I had the same results. Success reported but the bin folder was not uploaded.

  3. I used the Azure Portal feature on the Azure Function to download the Content. All the function definitions are in the downloaded .zip file, but the bin folder with all dll's is missing.

  4. I have never had any issues deploying to Azure Functions. This application runs perfectly on my local machine. This application builds without any warnings or errors.

  5. If I navigate to the \bin\Release\net6.0 folder all of the dll's are present and the bin folder is present with all of the contents.

For some unknow reason, the contents of the bin folder are not being upload. Or possibly the bin folder is upload but then Azure Cloud fails to property configure or install the dll's correctly.

No errors are report in the Azure Portal, or in the vscode console.

We greatly appreciate and thank you for trying to help us install the application.

Azure Resources 0.8.0 Azure Functions 1.13.3

Visual Studio Code Version: 1.85.1 (user setup) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:49:37.021Z (2 mos ago) Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

You can see that no errors are reported. Yet, no functions are listed here, or in the Azure portal.

no errors and no functions

nturinski commented 7 months ago

@longtimedeveloper Could you share your .vscode/settings.json with me? You should have the following setting:

"azureFunctions.deploySubpath": "bin/Release/net6.0/publish",

If not, could you try pressing F1 and search for this command: image

If this doesn't unblock deployment, please consider using the Azure CLI, but hopefully this should work.

I hope that you stay safe and thank you for your service.

longtimedeveloper commented 7 months ago

@nturinski thank you for a very quick response.

I added the setting you recommended.

I executed the command you provided and tried to deploy but it didn't work.

longtimedeveloper commented 7 months ago

@nturinski I am trying to figure out how to use the CLI now to deploy. I respond soon. Thank you!

nturinski commented 7 months ago

@nturinski thank you for a very quick response.

I added the setting you recommended.

I executed the command you provided and tried to deploy but it didn't work.

Does the deployment throw an error now or does it still say that it succeeded?

Could you share what your .vscode/settings.json contains? Also, could you try to navigate the function app > Files node and see what files are actually being deployed?

longtimedeveloper commented 7 months ago

@nturinski you wrote, "Also, could you try to navigate the function app > Files node and see what files are actually being deployed?"

I don't understand what or where you want me to look.

longtimedeveloper commented 7 months ago

@nturinski BINGO Deploying using the Azure CLI worked the first time, zero issues.

Thank you so much for unblocking me. One day, Lord willing I'll visit Microsoft, I worked on the Cider Team and p&p for many years. Would love to get some Indian food and have a chat with you and many of my other friends including ScottGu.

Should we leave this issue open so the Azure Resources extension can get fixed?

nturinski commented 7 months ago

Glad that the Azure CLI was able to unblock you. And Indian food sounds delicious!

We can leave this issue opened for tracking purposes. Sorry, I wasn't clear, but I wanted to see your workspace settings.json. I believe that is your user settings.

In your File Explorer, you should see this file: image

And when you open it, it should look something like this: image

longtimedeveloper commented 7 months ago

@nturinski

My project file is in the subfolder. The solution file is in the root.

{
  "azureFunctions.deploySubpath": "spravzhni_azure/bin/Release/net6.0/publish",
  "azureFunctions.projectLanguage": "C#",
  "azureFunctions.projectRuntime": "~4",
  "debug.internalConsoleOptions": "neverOpen",
  "azureFunctions.preDeployTask": "publish (functions)"
}
nturinski commented 7 months ago

@longtimedeveloper

Thanks for sharing. I think that in the future that the deployment should be working now. Sometimes the deployment can take a little bit of time to propagate to the app so you may not see the changes right away.

longtimedeveloper commented 7 months ago

OK, I will try tomorrow after make a few changes and try to use the tooling to deploy. Great to have a fallback, CLI.

I have never noticed any delay when deploying using the tooling before. I have maybe 10 Azure function projects of various sizes.

Thank you again, much appreciate the fast and professional assistance.

nturinski commented 7 months ago

Yeah, please keep me posted. Would love to make sure that you have no issues when deploying through VS Code 😄

longtimedeveloper commented 6 months ago

@nturinski I tried to use the Azure Resources extension this morning to deploy to the cloud. Unfortunately, it continued to fail the same as previously reported.

I'll use the Azure CLI from now on. I hope the team can sort out the problems with the Azure Resources extension.

Thank you again for all you did for me so quickly.

Last night they attacked us all night. So many explosions. Even now, more explosions. Crazy writing code under daily fire but we need this application. Lord bless you.

nturinski commented 6 months ago

I pray that you stay safe over there. We will continue to try to figure out where the extension is failing on our end.