Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mark a C# assembly as a CLS Compliant when using new csproj format?

I recently upgraded a C# project from xproj format to the new csproj. During the migration, the old AssemblyInfo.cs has been removed so I'm wondering how I can indicate that my library is clscompliant?

FYI: this is the attribute that was in the AssemblyInfo.cs: [assembly:CLSCompliant(true)]

like image 649
desautelsj Avatar asked Oct 21 '17 20:10

desautelsj


1 Answers

Just add AssemblyInfo.cs back, with only the parts that aren't autogenerated.

There's nothing to stop you from applying assembly attributes in code - it's just that most of the common attributes are provided from the project settings.

like image 125
Jon Skeet Avatar answered Sep 21 '22 01:09

Jon Skeet