the question is straight forward but I’m new to .NET and C#. I have a .csproj file that references as target framework 472
<TargetFramework>net472</TargetFramework>
even though solely .NET 8 is installed. This also works fine in my CI/CD pipelines.
I was just wondering and ask how does this work? For example changing the target framework to 481 failed my build. So can anyone explain this to me and if yes what is beeing executed? 472 or .NET 8? And what is recommended? Is it preferred to install .NET 8 even if it’s not needed neccessarily?