Setting the CLSComplaint attribute to true shows error with VisualStudio 2022

241 Views Asked by At

I have set the CLSComplaint attribute to true but i am facing an error with the public properties used. The same code works fine with VS10 but only showing error with VS2022.

[assembly: CLSCompliant(true)]

Showing error with the Public property and it does not showing error if we change it as internal

1

There are 1 best solutions below

0
On

According to this link, the feature is deprecated. It is recommended not to use that approach, but to keep all build settings within the source-controlled workspace, so that builds are reliable across environments.