I am looking at and following example code that has the following lines:
public static DispenseOptionSketchVolume DoSketchVolume = new();
public static SketchSettingsPageData SketchSettingsPageData = new();
public static BlockVolumeData BlockVolumeData = new();
public static SketchEntityVolumePage SketchEntityVolume = new();
In my own project I created a framework 4.8 class library but get the error:
Feature 'target typed object creation' is not available. Please use language version 9.0 or greater.
new();is the error.
If I add this to my own csproj:
<PropertyGroup>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
Visual Studio asks me to attach to a process:

In the example project the framework is set to 4.8, the type is a class Library, there is a framework that automatically registers the dll and it runs. There is no <LangVersion> directive in any file csproj or otherwise.
How could the example project compile the = new(); statements?
I just set <LangVersion>9.0</LangVersion> on a large .NET Framework 4.8 solution and it works as expected. The target-typed new is available and no error messages are shown. I successfully tried both VS2019 and VS2022. So it seems this does work. Maybe you need to make sure you're building with at least the .NET 5.0 compiler. Make sure your global.json is requiring at least a 5.0 SDK.