使用 DisqusSharp 时遇到的困难
我正在使用 DisqusSharp:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WWB.DisqusSharp.Model.DisqusService;
using WWB.DisqusSharp.Infrastructure.Hammock;
namespace DisqusSharpTest
{
class Program
{
static void Main(string[] args)
{
Console.Out.WriteLine("foo");
Console.In.ReadLine();
IDisqusService disqus = new HammockDisqusService("myKey");
IEnumerable<string> names = disqus.GetThreadList("myForumId", new StartLimitArgs { Start = 0, Limit = 5 })
.Payload.Select(disqusThread => disqusThread.Title);
foreach (string name in names)
{
Console.WriteLine(name);
}
}
}
}
添加对 WWB.DisqusSharp.dll
以及 Hammock.dll
和 Newtonsoft.Json.dll
的引用后>,这似乎工作正常。我使用 Visual Studio 的自动更正功能,它为 WWB
类添加 using
语句。
但是,当我单击“开始调试”或“开始但不调试”时,它会抱怨构建错误,指出找不到命名空间 WWB
。然后我重新添加引用,它再次工作,直到我再次点击“开始调试”。
我做错了什么?
I am playing around with DisqusSharp:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WWB.DisqusSharp.Model.DisqusService;
using WWB.DisqusSharp.Infrastructure.Hammock;
namespace DisqusSharpTest
{
class Program
{
static void Main(string[] args)
{
Console.Out.WriteLine("foo");
Console.In.ReadLine();
IDisqusService disqus = new HammockDisqusService("myKey");
IEnumerable<string> names = disqus.GetThreadList("myForumId", new StartLimitArgs { Start = 0, Limit = 5 })
.Payload.Select(disqusThread => disqusThread.Title);
foreach (string name in names)
{
Console.WriteLine(name);
}
}
}
}
After I add references to WWB.DisqusSharp.dll
, as well as Hammock.dll
and Newtonsoft.Json.dll
, this appears to work fine. I use Visual Studio's autocorrect feature and it adds using
statements for the WWB
classes.
However, when I click "start debugging" or "start without debugging", it complains of a build error, saying that the namespace WWB
cannot be found. I then re-add the reference, and it works again, until I hit "start debugging" again.
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我是 WWB,我想我应该将 disqussharp 添加到监视列表中。无论如何,我不确定您遇到的问题,但我建议使用 nuget 包 作为测试以确保接线正确。
I'd be WWB, guess I should add disqussharp to the watch list. Anyhow, I'm not sure the problem you are having, but I'd suggest using the nuget package as a test to make sure things get wired up correctly.