azure-functions-core-tools
azure-functions-core-tools copied to clipboard
azure function v4 is not detected by vs 2022 for mac
I have installed Azure function v4 and ie the default runtime for the azure function-core tools. But while debugging the azure function using VS 2022 for Mac it is starting the azure function v3 and while looking at the source it seems it is using different azure CLI from addins that come with part of visual studio 2022. Any way we can select our own version of azure function runtime like how VS Code provides instead of relying on VS 2022 mac provided azure function is not latest?
VS 2022 for windows is taking care of this automatically if I specify below in csproj, expecting the same from VS 2022 for ma
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
In the logs I can see that VS for Mac is trying to load different Azure CLI : '/Applications/Visual Studio (Preview).app/Contents/MonoBundle/AddIns/MonoDevelop.AzureFunctions/azure-functions-cli/
It is bad that Visual Studio is not upto date with Azure Function core run times. It should have features like VS Code to choose whichever azure function run time.
I've noticed the same, both of the recent previews of VS 2022 for Mac including 5, released yesterday do the same, I've switched to Jetbrains Rider for the time being as that is able to correctly pick up the v4 function and debug it correctly, VS 2022 currently tries to launch the v3 function runtime:-
Azure Functions Core Tools Core Tools Version: 3.0.3904 Commit hash: c345f7140a8f968c5dbc621f8a8374d8e3234206 (64-bit) Function Runtime Version: 3.3.1.0
despite the project file containing the reference to v4:-
Due to the same issue I have also just bought Rider and it works out of the box. Why does Rider support Microsoft better than Microsoft?
I have also followed the step to force use v4 as shown here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Cmacos%2Ccsharp%2Cportal%2Cbash
I think you can update the core tools that Visual Studio for Mac uses https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=v4%2Cmacos%2Ccsharp%2Cportal%2Cbash
In my case it worked
Thanks Dan, I have tried doing this several times, uninstalled both VS and the core tools and reinstalled unfortunately with no positive effect. I presume that core-tools v3 is bundled with the preview of VS 2022 for Mac and that the homebrew install doesn't touch it.
I had the same issue. I uninstalled EVERY SDK and runtime .net version also the versions that was used by VS and reinstalled VS2022 that fixed it for me.