471,317 Members | 2,558 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

Where to put [assembly: CLSCompliant(true)]?

I'd like to mark an entire assembly as CLS compliant. The examples I
have seen say to put this reference

[assembly: CLSCompliant(true)]

just outside of any class under "using System;". Can this go into any
file outside of class declarations?

References:
http://www.devarticles.com/c/a/C-Sha...CLS-Compliant/
http://www.codeproject.com/csharp/ef...rt1.asp#item12

Thanks,
brettr

Feb 7 '06 #1
2 13183
> I'd like to mark an entire assembly as CLS compliant. The examples I
have seen say to put this reference

[assembly: CLSCompliant(true)]

just outside of any class under "using System;". Can this go into any
file outside of class declarations?

References:
http://www.devarticles.com/c/a/C-Sha...CLS-Compliant/
http://www.codeproject.com/csharp/ef...rt1.asp#item12

Thanks,
brettr


I would think that the attribute belongs in the AssemblyInfo file. But, it's
legal to put it right after the using statements in any csharp file.
Feb 7 '06 #2
You can place this attribute anywhere outside the type definitions and
namespaces, somewhere in the "white space". As an example, I usually throw
this attribute in the AssemblyInfo.cs file since this file by default
contains other assembly-level attributes.

--
Tim Wilson
..NET Compact Framework MVP

"Brett Romero" <ac*****@cygen.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I'd like to mark an entire assembly as CLS compliant. The examples I
have seen say to put this reference

[assembly: CLSCompliant(true)]

just outside of any class under "using System;". Can this go into any
file outside of class declarations?

References:
http://www.devarticles.com/c/a/C-Sha...CLS-Compliant/
http://www.codeproject.com/csharp/ef...rt1.asp#item12

Thanks,
brettr

Feb 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

46 posts views Thread by Scott Chapman | last post: by
1 post views Thread by AlexB | last post: by
1 post views Thread by Zachary Hartnett | last post: by
10 posts views Thread by vwd2005eeb | last post: by
2 posts views Thread by Jeff | last post: by
9 posts views Thread by =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.