Export (0) Print
Expand All
Expand Minimize

Compiler Error CS1560 

Error Message

Invalid filename specified for preprocessor directive. Filename is too long or not a valid filename

The file name that was specified with #line (C# Reference) exceeded _MAX_PATH (256 characters) or the line on which #line was found exceeded 2000 characters.

Example

The following sample generates CS1560.

// cs1560.cs 
using System; 
class MyClass 
{   
   public static void Main()    
   {      
      Console.WriteLine("Normal line #1.");   
      #line 21 "MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890MyFile1234567890.txt"   // CS1560
    }
}

Community Additions

ADD
Show:
© 2014 Microsoft