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

There is an error under the "Functions" node after deploying .NET 7 project to .NET 8 Linux consumption function app #4052

Open v-xinda opened 5 months ago

v-xinda commented 5 months ago

OS: All Build Version: vscode-azurefunctions-1.13.5-alpha.0-4

Repro Steps:

  1. Create a .NET 7 project and open in VS Code.
  2. Create a .NET 8 Linux consumption function app -> Deploy the above project to it.
  3. Expand the function app -> Expand the "Functions" node.
  4. Check whether there is no error.

Expect: There is no error.

Actual: There is an error under the "Functions" node. image Output log as below: image

More Info: Pop up a notification "Loading 'Function...'" after deploying .NET 7 project to .NET 8 Linux consumption function app successfully. image

nturinski commented 5 months ago

Does the Functions get listed eventually after the deployment? Does this reproduce for other ASPs, such as Premium plans?

I'm wondering if it is just taking a long time to build the app.

v-xinda commented 5 months ago

@nturinski The function doesn't list after the deployment.

  1. There is no function after deploying .NET 7 project to .NET 8/6 Linux Premium/App Service Plan function app.
  2. An error occurs after deploying .NET 7 project to .NET 6 Linux Consumption function app. image
  3. This issue doesn't reproduce after deploying .NET 7 project to .NET 7 Linux function app.
  4. This issue also doesn't reproduce for the Windows function app.
nturinski commented 5 months ago

I don't think .NET versions are compatible between different version numbers. ie you shouldn't make a .NET 7 project and deploy it to .NET 6/8 apps. We can probably block users from doing this behavior.