Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find/Set Azure Functions Core Tools version Visual Studio use

Got below error while trying to run the Azure Function in VS2022 locally.

This version of the Azure Functions Core Tools requires your project to reference version 4.5.0 or later of Microsoft.NET.Sdk.Functions. 

It can be fixed by updating the version of Microsoft.NET.Sdk.Functions, however that's also mean I will need to spend quite some times to test as code coverage is not good enough.

As a short term solution, would like to know how can I find out the Azure Functions Core Tools version VS is using, as well as how to rollback to the pervious version?

like image 495
Bill Avatar asked Jan 20 '26 17:01

Bill


2 Answers

Incase your functions are running in isolated worker model, you need to update the same on local.settings.json file for running your functions locally from visual studio as following.

"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",

I was also getting the same error, which got resolved after updating the runtime

like image 113
Sourabh Gupta Avatar answered Jan 22 '26 12:01

Sourabh Gupta


In order to fix the error showed in @Bill question, I run the followed steps:

  1. In Nuget Package Manager: update Microsoft.NET.Sdk.Functions to 4.5.0 version
  2. In Visual Studio 2022: Tools -> Options -> Projects and Solutions -> Azure Functions -> Check for updates
  3. After Check for updates, click in Download & Install button
like image 32
Pedro Romero Avatar answered Jan 22 '26 13:01

Pedro Romero



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!