我试图让我用C#编写的程序与Mono一起工作。
项目在这里 - https://github.com/micahasmith/cstatic
我有构建脚本来" mono make"它设置如此 -
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'
有什么想法吗?
答案 0 :(得分:1)
我需要将servicestack dll放在与mono生成的exe文件相同的文件夹中。