Upgraded this site to .NET 9 (but not the associate function: it seems that .NET 9 cannot be used with functions yet!)

by Patrick Lee on 27 Nov 2024 in categories tech with tags ASP.NET Core Functions .NET 9.0

Further to this post, I upgraded this website to .NET9 at the weekend. That was straightforward, I just had to update Visual Studio 2022 to the latest version and then upgrading the site amounted to just changing the target in its project file.

I also tried upgrading the associated function, but it seems (as too often with Microsoft releases) that .NET 9 is not yet really fully available.  It doesn't work with functions yet:

I tried increasing the version of the function to .NET 9 but I got a compile error:

"Invalid combination of TargetFramework and AzureFunctionsVersion is set."

I tried increasing the function version from 4 but 4 seems to be the highest currently available version.

So it seems that functions can't yet be upgraded to .NET 9.