Article ID: 2832705 - View products that this article applies to.
You have a C# Class library project with a class containing an event and you marked the event with the "Obsolete" attribute. When you add reference to this class library in other project, for example a Console application and subscribe to that event, no warning is generated in the latter project.
Typically a warning (CS0618) should be generated during compilation in Visual Studio when a method, event or property is marked with the "Obsolete" attribute.
ObsoleteAttribute is applicable to all program elements except assemblies, modules, parameters or return values and works as expected.
This is a known issue with Microsoft C# compiler.
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Article ID: 2832705 - Last Review: April 5, 2013 - Revision: 1.0
Contact us for more help
Connect with Answer Desk for expert help.