This documentation is archived and is not being maintained.

Compiler Warning (level 1) CS2002

Visual Studio 2008

Source file 'file' specified multiple times

A source file name was passed to the compiler more than once. You can only specify a file once to the compiler to build an output file.

This warning cannot be suppressed by the /nowarn option.

The following sample generates CS2002:

// CS2002.cs
// compile with: CS2002.cs
public class A
public static void Main(){}

To generate the error, compile the example with the command line:

csc CS2002.cs CS2002.cs