Compiler Error CS2032

Character 'character' is not allowed on the command-line or in response files

Response files and the command line options for csc.exe cannot contain ASCII control characters in the range 0-31 or the pipe (|) character.

Compiler error CS2032 is difficult to demonstrate from the command line because the command line processor and the integrated development environment (IDE) filter out characters that are not valid. The following procedure generates the error by using a response file.

To generate this error

  1. In the My Documents folder, create a text file that is named CS2032.rsp, and then enter the following compiler options in it:

    /target:exe /out:cs|2032.exe cs2032.cs
    
  2. In the My Documents folder, create a text file that's named cs2032.cs and that contains whatever you want.

  3. Open Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell.

  4. Change the current directory to C:\Users\\<YourUsername>\Documents.

  5. Run the following command from the command prompt: csc @cs2032.rsp

  6. The CS2032 error message appears because the response file, CS2032.rsp, contains a pipe character.