我正在尝试让我用 C# 编写的程序与 Mono 一起工作。
项目在这里——https://github.com/micahasmith/cstatic
我有构建脚本来“单声道制作”它设置如下 -
dmcs -r:../packages/ServiceStack.Text.3.9.48/lib/net35/ServiceStack.Text.dll \
-target:exe -out:cstatic.exe \
`find . -name "*.cs"`
这构建得很好并生成了 cstatic.exe。但是,当我像这样运行它时
mono cstatic.exe
我得到以下信息:
Missing method ToJson in assembly /Users/micahasmith/Downloads/cstatic/CStatic/CStatic/cstatic.exe, type ServiceStack.Text.StringExtensions
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'ServiceStack.Text, Version=3.9.45.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'ServiceStack.Text, Version=3.9.45.0, Culture=neutral, PublicKeyToken=null'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'ServiceStack.Text, Version=3.9.45.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
File name: 'ServiceStack.Text, Version=3.9.45.0, Culture=neutral, PublicKeyToken=null'
有任何想法吗?