Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Compiler Error CS1560

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.

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:
© 2015 Microsoft