Mystery errors
-
I just love it when Visual Studio displays and error that neither Microsoft nor google search returns a match for. I'm creating an Azure function app in VS 2022 with the target framework set to .NET8.0. Building the code returns only one error:
"TargetFramework is invalid. Change the TargetFramework to net5.0 or net6.0"
So VS 2022 which allows me to select net8.0 doesn't really support net8.0? (sigh)There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes) -
I just love it when Visual Studio displays and error that neither Microsoft nor google search returns a match for. I'm creating an Azure function app in VS 2022 with the target framework set to .NET8.0. Building the code returns only one error:
"TargetFramework is invalid. Change the TargetFramework to net5.0 or net6.0"
So VS 2022 which allows me to select net8.0 doesn't really support net8.0? (sigh)There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes)It's not Visual Studio. It's Azure Functions and the tool chain for it. From the Azure blog: GA: Azure Functions supports .NET 8 in the isolated worker model[^] And look at the "Supported Versions" section at: Guide for running C# Azure Functions in an isolated worker process | Microsoft Learn[^] So, are you using the isolated-worker model and have the latest version of the tooling? If not, support for .NET 8 isn't there yet.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
-
It's not Visual Studio. It's Azure Functions and the tool chain for it. From the Azure blog: GA: Azure Functions supports .NET 8 in the isolated worker model[^] And look at the "Supported Versions" section at: Guide for running C# Azure Functions in an isolated worker process | Microsoft Learn[^] So, are you using the isolated-worker model and have the latest version of the tooling? If not, support for .NET 8 isn't there yet.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
Yes, we are using the isolated-worker model and I thought we had everything we need, but that gives me something to check. Thank you!
There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes) -
I just love it when Visual Studio displays and error that neither Microsoft nor google search returns a match for. I'm creating an Azure function app in VS 2022 with the target framework set to .NET8.0. Building the code returns only one error:
"TargetFramework is invalid. Change the TargetFramework to net5.0 or net6.0"
So VS 2022 which allows me to select net8.0 doesn't really support net8.0? (sigh)There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes)Same for C++ apparently, my colleague complained that .NET 8 could not be selected yet, so now our solution with C# and C++ projects has an ugly mix of windows8-net8 and windows8-net7 paths.
-
I just love it when Visual Studio displays and error that neither Microsoft nor google search returns a match for. I'm creating an Azure function app in VS 2022 with the target framework set to .NET8.0. Building the code returns only one error:
"TargetFramework is invalid. Change the TargetFramework to net5.0 or net6.0"
So VS 2022 which allows me to select net8.0 doesn't really support net8.0? (sigh)There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes) -
Same for C++ apparently, my colleague complained that .NET 8 could not be selected yet, so now our solution with C# and C++ projects has an ugly mix of windows8-net8 and windows8-net7 paths.
The first versions of 2022 didn't support net8, but I assume your colleague has a version that does. Unlike your colleague I can select net8, everything in the solution is net8. TGIF
There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes) -
The first versions of 2022 didn't support net8, but I assume your colleague has a version that does. Unlike your colleague I can select net8, everything in the solution is net8. TGIF
There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes)I'm sure he has the newest version of VS, he's always (too) keen to update to a new version. I don't know where exactly the problem lies, but I suspect it's in one or more of the 3rd party libraries he uses for video.
-
Hmm, try deleting the bin and obj folders, then rebuilding. Fixes a lot of 'incompatibility' issues that occur when switching frameworks.
Thanks, unfortunately that didn't work this time. Clicking into the error brings up a window that looks like a build configuration file for
Microsoft.Azure.Functions.Worker.Sdk.targets
and points me to this line inside a block:I can find no direct reference to this configuration, where it comes from or how to change it. Things like this shouldn't be hard. X|
There are no solutions, only trade-offs.
- Thomas SowellA day can really slip by when you're deliberately avoiding what you're supposed to do.
- Calvin (Bill Watterson, Calvin & Hobbes) -
It's not Visual Studio. It's Azure Functions and the tool chain for it. From the Azure blog: GA: Azure Functions supports .NET 8 in the isolated worker model[^] And look at the "Supported Versions" section at: Guide for running C# Azure Functions in an isolated worker process | Microsoft Learn[^] So, are you using the isolated-worker model and have the latest version of the tooling? If not, support for .NET 8 isn't there yet.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles. Dave Kreskowiak
of course, developers would have to debug it. Hey, I have an idea. Maybe Microsoft should follow a basic UI principle. If it won't work or is not supported, don't let the user select it. The alternative might be to point out the issue with more details. But nah, I don't expect that of Microsoft. Jeesh. fwiw, this crap seems to be culturally embedded within Microsoft. COM, COM+, DCOM, ActiveX (another variant of COM), etc. They never learn; however, they can embed advertisements in my toolbar. :mad:
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.