I believe that you need to specify this in the web.config file. See Also: Compiler Element and Web Project Settings
<system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" compilerOptions="/nowarn:618"/> </compilers> </system.codedom>
An alternative would be to add a #pragma statement around each of the insult methods, but if there are hundreds, suppressing the blanket is likely to be faster.
#pragma warning disable 612, 618 [Obsolete("Use something else instead")] #pragma warning restore 612, 618
source share