2

When I try to run (debug) functions in Visual Studio 2017 on one of our machines, the following dialog pops up!

enter image description here

The target framework for the project is <TargetFramework>net461</TargetFramework>. For some reasons I am not able to install .NET 4.7.1 and now I am completely lost. I am sure it was functioning in the past on the same machine. Probably one of the updates caused it.

Any idea how to resolve it?

Mori
  • 2,484
  • 5
  • 28
  • 45
  • Could you show me what have you updated? This is the similar [question](https://stackoverflow.com/questions/44237105/this-application-requires-one-of-the-following-versions-of-net-framework) – Joey Cai Mar 05 '18 at 12:07
  • @JoeyCai I think it was an update for Azure Function Tools for Visual Studio – Mori Mar 05 '18 at 12:12

3 Answers3

2

This is because the latest version of the Azure Functions Tools for Visual Studio now requires .NET Framework 4.7.1 (as of February 2018).

Note that this does not impact the target framework that you compile against - only the target framework your code runs against. Similarly, when you run in Azure, you can expect the .NET runtime version to be .NET Framework 4.7.1 (at the time of writing).

Chris Gillum
  • 14,526
  • 5
  • 48
  • 61
  • Thanks but what am I supposed to do? Do I have to I uninstall and then reinstall the old version? I am not able to install the version 4.7.1 – Mori Mar 06 '18 at 10:11
  • @Mori I think you need to figure out why you're not able to install .NET Framework 4.7.1. – Chris Gillum Mar 06 '18 at 17:34
0

I tried implementing the solution mentioned in comment. However, it didn't work for me. However, reverting the Azure Functions Tools to previous version worked. Thanks Chris for pointing that it was Azure Tools and not any packages that caused it.

Shridhar
  • 49
  • 7
0

If anyone else should come across this.

For me, the issue was the actual func.exe config that needed to be upgraded.

Navigate to: C:\Users[USER]\AppData\Local\AzureFunctionsTools\Releases[VERSION]\cli .. my version was 1.4.0

Modify the func.exe.config to match the .net version installed

.. it was 4.7.1

musch
  • 31
  • 5