我收到了很多错误。我在尝试使用DMCS编译器编译程序时遇到这些错误。任何帮助表示赞赏!
命令:
dmcs -recurse:'*/*.cs' -r:mysql.data.dll -r:Newtonsoft.Json.dll
这些是错误:
Unhandled Exception: System.ArgumentException: Path is invalid
Parameter name: path
at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.ProcessSourceFiles (System.String spec, Boolean recurse) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.CSCParseOption (System.String option, System.String[]& args) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.ParseArguments (System.String[] args, Boolean require_files, System.Func`3 unknown_option_parser) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Create (System.String[] args, Boolean require_files, System.Func`3 unknown_option_parser, Mono.CSharp.ReportPrinter printer) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: Path is invalid
Parameter name: path
at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.ProcessSourceFiles (System.String spec, Boolean recurse) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.CSCParseOption (System.String option, System.String[]& args) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.ParseArguments (System.String[] args, Boolean require_files, System.Func`3 unknown_option_parser) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Create (System.String[] args, Boolean require_files, System.Func`3 unknown_option_parser, Mono.CSharp.ReportPrinter printer) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
答案 0 :(得分:0)
也许你的编译器不理解-recurse
。尝试通过调用shell扩展它:
dmcs **/*.cs -r:mysql.data.dll -r:Newtonsoft.Json.dll
可能适用于最近的bash
(版本4)或zsh
;否则试试
dmcs $(find -type f -name '*.cs') \
-r:mysql.data.dll -r:Newtonsoft.Json.dll