We are currently evaluating an upgrade from Ensenso SDK 4.1.1033 to 4.3.1037 and have encountered a build issue. We would appreciate it if anyone could clarify whether our workaround is officially supported.
Issue
When updating the Ensenso SDK from 4.1.1033 to 4.3.1037 (latest version), the following build error occurs.
Error Message
Feature ‘target-typed object creation’ is not available in C# 7.3.
Please use language version 9.0 or greater.
thank you for bringing this regression to our attention. It will be fixed in the next release.
Regarding your questions:
The Ensenso SDK 4.3.x .NET interface was accidentally updated to use modern C# 9.0 features. The .NET Framework 4.8.1 runtime fully supports C# 9.0+ features - the limitation is only in the default language version that Visual Studio projects target by default.
Adding <LangVersion>latest</LangVersion> to your project file is the standard and officially supported approach for enabling newer C# language features in .NET Framework 4.8.x projects. This is Microsoft’s recommended method and should not cause any compatibility issues.