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()
{
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for