1

我正在尝试让我用 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'

有任何想法吗?

4

1 回答 1

1

我需要将 servicestack dll 放在与单声道生成的 exe 文件相同的文件夹中。

于 2013-06-04T16:09:04.900 回答