microsoft / vscode-azurefunctions

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

An error occurs after executing "Execute Function Now..." action for the .NET 8 function app which deployed the .NET 7/6 Isolated project #3836

Open v-xinda opened 1 year ago

v-xinda commented 1 year ago

OS: Win10 Build Version: 20230910.1 Regression: Not a regression

Repro Steps:

  1. Create a .NET 8 function app.
  2. Create a .NET 7 Isolated project -> Deploy it to the .NET 8 function app.
  3. Expand the function app -> Functions -> Right click the function -> Click "Execute Function Now..." -> Type the default value -> Enter.
  4. Check whether no error occurs.

Expect: No error occurs.

Actual: An error occurs. image

Details in Output:

6:48:17 AM: Error: <div style="display: block; margin: auto;  width: 600px; height: 500px; text-align: center; font-family: 'Courier', cursive, sans-serif;"><h1 style="color: 747474">:( Application Error</h1><p style="color:#666">If you are the application administrator, you can access the <a style="color: grey"href="https://anicole-net8-lin-p.scm.azurewebsites.net/detectors">diagnostic resources</a>.</div>

More Info:

  1. This issue also reproduces for the .NET 8 function app which deployed the .NET 6 Isolated project.
  2. This issue doesn't reproduce for the .NET 8 function app which deployed the .NET 6 (LST) project.
v-xinda commented 1 year ago

Verified this issue with the build 20230917.5, it still reproduces for now. So I reopen it.

nturinski commented 1 year ago

Could you verify that the same issue occurs when deploying through the func CLI?

Here are instructions on how to do that: https://learn.microsoft.com/en-us/azure/azure-functions/functions-core-tools-reference?tabs=v2#func-azure-functionapp-publish

We want to validate if this is a service issue or a VS Code issue.

v-xinda commented 1 year ago

@nturinski This issue doesn't reproduce if the .NET 7/6 Isolated project is deployed to function app using the func CLI command. image

NOTE: If the project had deployed using func CLI, but it is also successful to execute "Execute Funtion Now..." after deploy the above project to function using "Deploy to Function App...".