Search code examples
c#zshoh-my-zshcsc

Using csc.exe to recursively find .cs files doesn't seem to work


I have the following CSC command:

$ csc -out:dist/program.exe src/program/*.cs -recurse:*.cs

This gives me the following error: no matches found: -recurse:*.cs

Does anyone have any idea why the -recurse option is not recognised/working properly in this case?


Solution

  • As commented by Caramiriel using ZSH handles the wildcards instead of giving them to csc.exe and because it doesn't find any files that match it the error no matches found: <pattern> is thrown.

    More information in this question.

    Answered to make it more useful for others rather than leave it as a comment only as discussed in meta posts (1, 2, 3, 4).