在继续学习和使用 ServiceStack 的过程中,我尝试使用 ac#/WPF 应用程序来使用 hello 服务。
我已经完成了使用 NuGet 安装所需文件的预期步骤:
PM> install-package servicestack.common
我相信我已经导入了正确的命名空间:
using ServiceStack.Common;
using ServiceStack.Common.ServiceClient.Web;
然而,当我尝试按照我在 Stack 和 Github 上找到的示例进行操作时,VS10 报告找不到类型或命名空间。
var client = new JsonServiceClient("http://172.16.0.15/");
我也无法使用我认为是完全限定名称的名称创建此对象:
var client = new ServiceStack.ServiceClient.web.JsonServiceClient . . .
为了使用这个类,是否必须安装另一个包或另一个引用?
更新:
Darin 建议的完全限定类型似乎并没有解决问题:
var client = new ServiceStack.ServiceClient.Web.JsonServiceClient("http://172.16.0.15/");
我仍然得到 VS10 报告:
"The type or namespace name 'ServiceClient' does not exist in the namespace 'ServiceStack'.... "