Reputation: 495
When VB.NET assembly is CLS-sompliant and some types inside it are not, the compiler shows not CLS-compliant type warnings (codes 40025, 40026, 40027, 40028).
In case I know about this non-compliance and fine with it, I want to hide the warnings. It is possible to do it in two ways:
1. Edit the project file and add the warnings to <NoWarn></NoWarn>
section.
2. Edit the AssemblyInfo and set <Assembly: CLSCompliant(False)>
.
Does anyone know about the upsides, downsides and possible consequences of these two approaches?
Upvotes: 1
Views: 653
Reputation: 76
If you just want to hide warnings about CSL-compliancy, just use <NoWarn/>
tags: it means that you don't care how CSL-compliancy of your code.
By using explicitly <Assembly: CLSCompliant(True/False)>.
, you clearly take a decision about the design/architecture of your code.
Upvotes: 2