Compiler Warning (level 1) CS1616

Option 'option' overrides attribute 'attribute' given in a source file or added module

This warning occurs if the assembly attributes AssemblyKeyFileAttribute or AssemblyKeyNameAttribute found in source conflict with the /keyfile or /keycontainer command line option or key file name or key container specified in the Project Properties.

For the example below, assume you have a key file named cs1616.snk. Generate this file with the command line:

sn -k CS1616.snk  

The following sample generates CS1616:

// CS1616.cs  
// compile with: /keyfile:cs1616.snk  
using System.Reflection;  

// To fix the error, remove the next line  
[assembly: AssemblyKeyFile("cs1616b.snk")]  // CS1616  

class C  
{  
  public static void Main()  
  {  
  }  
}