I’m working with a solution containing over 50 projects targeting both .NET Framework 4.8 and .NET 7 (Windows only). I’ve encountered an issue where the compiler provides syntax suggestions that are incompatible with C# 7.3, such as IDE0090, which requires C# 9 or higher. Implementing these suggestions causes the build to fail for .NET 4.8 targets.
To resolve this, I can manually set the language version or ignore the message code, but these are not viable long-term solutions since we plan to eventually move away from .NET 4.8 and I don’t want to lock in a specific language version.
Is there a setting or feature in Visual Studio 2022 that can manage language version detection more accurately? It seems problematic that the compiler fills the Errors List with tons of recommendations based on the maximum language version rather than the minimum required.