473,698 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where to put [assembly: CLSCompliant(tr ue)]?

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

[assembly: CLSCompliant(tr ue)]

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 13545
> I'd like to mark an entire assembly as CLS compliant. The examples I
have seen say to put this reference

[assembly: CLSCompliant(tr ue)]

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.goo glegroups.com.. .
I'd like to mark an entire assembly as CLS compliant. The examples I
have seen say to put this reference

[assembly: CLSCompliant(tr ue)]

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
4232
by: Scott Chapman | last post by:
There seems to be an inconsistency here: Python 2.3.2 (#1, Oct 3 2003, 19:04:58) on linux2 >>> 1 == True True >>> 3 == True False >>> if 1: print "true" ....
1
1781
by: AlexB | last post by:
A windows forms .NET application has various built in attributes like: <Assembly: AssemblyTitle("MyAssembly")> <Assembly: AssemblyDescription("Blahblah")> <Assembly: AssemblyCompany("XYZ")> But how can I reference these from within my windows forms application???
1
2790
by: Zachary Hartnett | last post by:
I was trying to write a routine this morning that would open a given assembly, walk the inheritance tree of classes in the assembly, and provide a list of classes in the assembly that inherit from DataSet. Here is a snippet from the routine I came up with: ------------------------------------------------------------ openFileDialog.ShowDialog(); Assembly assembly = Assembly.LoadFile(openFileDialog.FileName);
10
2046
by: vwd2005eeb | last post by:
Visual Web Developer 2005 Express Edition Beta I did Build | Build Web site, where are the DLLs? I was expecting to see maybe one dll for each Web page in a directory (maybe still "bin") under Inetpub/wwwroot/mywebsite/ Thanks.
2
3387
by: Greg Bell | last post by:
Hi why does first bit work and 2nd doesn't: 1. Dim m_Trademark As SR.AssemblyTrademarkAttribute m_Trademark = m_AssInfo.GetCustomAttributes(GetType(SR.AssemblyTrademarkAttribute), False)(0) 2.
2
3378
by: Jeff | last post by:
Hey asp.net 2.0 My asp.net 2.0 project has got a assembly load problem: Some of my web.config settings: <membership defaultProvider="AH_MembershipProvider" userIsOnlineTimeWindow="15">
1
2252
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9 I have pasted the part I'm interested in below. My company doesn't use versioning or the gac and I'd like to. We're on vs.net 2005 & .net 2., is this still true or has it changed since then? thanks That article is not entirely accurate. ...
9
6348
by: =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= | last post by:
"parez" wrote: Assembly.LoadWithPartialName does indeed work!! Now, why is this incredibly useful routine deprecated and we are instructed to use Assembly.Load instead which does not provide the same functionality?!? I'll check now, but maybe someone knows... Is this deprecated routine still available in Visual Studio 2008 and .NET 3.5?
0
8672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9018
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8890
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8858
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3038
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.