Josh
Josh

Reputation: 107

Azure Function App won't run on Visual studio 2017 Requiring .NET Framework 4.7.1

I had my Azure function running by yesterday but after updating windows to Version 17755.1 the app fails to run with n error requesting .NET Framework version 4.7.1 to be installed. I have counterchecked on my pc and actually the .NET Framework version 4.7.1 is installed. I tried to install the it from here but it won't install.

Error on running app

Error on trying to install .net framework

Upvotes: 2

Views: 514

Answers (1)

David Ebbo
David Ebbo

Reputation: 43183

That build of Windows appears to have a general issue running any .NET app that targets 4.7.1.

Here is a workaround:

  • Go to %LOCALAPPDATA%\AzureFunctionsTools\Releases\[cliversion]\cli
  • Edit func.exe.Config
  • Change the supportedRuntime tag to target 4.7.2 instead of 4.7.1

    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
    

Upvotes: 3

Related Questions