在OS X(MDK 3.2.3)上使用Mono和根據MonoMVC's instructions安裝的NuGet,我試圖遵循the "your first webservice" tutorial in ServiceStack's documentation。本教程假定我的環境中不存在IIS和Visual Studio,並且在互聯網上搜索解決方案几個小時後,我已經完成了他們未提及的以下額外步驟:單聲道無法加載ServiceStack.Interfaces.dll
- 將
web.config
示例在<configuration>
標記中。 - 把對你好類的源代碼名爲
App_Code
複製所有
.dll
文件的NuGet與find . -iname '*.dll' -exec cp {} bin \;
- 下載到一個名爲
bin
文件夾使用xsp4
從根文件夾的文件夾中我的項目託管一個開發服務器。我的項目bin
文件夾中。
當我試圖訪問localhost:8080
,我現在收到此錯誤信息:
System.Web.Compilation.CompilationException
CS1684型的引用ServiceStack.ServiceHost.IResolver
聲稱,它被定義 裝配ServiceStack.Interfaces, Version=3.9.60.0, Culture=neutral, PublicKeyToken=null
,但無法找到
如何解決此錯誤?
編輯:於失蹤方法刪除引用.ctor錯誤,因爲他們是無關的上述CompilationException。如果我將System.Core.dll從lib/mono/4.5
複製到bin
文件夾,但它們仍然消失。
我試着對你的倉庫進行反向工程,看看它爲什麼起作用,我的代碼沒有。將ServiceStack從3.9.64 nuget最初的默認值切換到packages.config中的3.9.59,可以擺脫我的問題中的錯誤,但是您也在預編譯Global.asax.cs,所以我想我需要想弄清楚下一步該怎麼做。 – Dan