简体   繁体   English

无法找到Twitterizer 2和C# - Namespace

[英]Twitterizer 2 and C# - Namespace could not be found

I have a silly problem with Twitterizer2 and probably me :) . 我对Twitterizer2有一个愚蠢的问题,可能是我:)。 I add the reference twitterizer 2.3.1 from my downloads directory along with the newtonsoft one by right clicking on references and browsing to find them. 我通过右键单击引用并浏览查找它们,从我的下载目录中添加了参考twitterizer 2.3.1以及newtonsoft目录。

I then add 然后我补充说

using Twitterizer;

lo and behold all my squiggly red underlines go away 我看到所有波浪形的红色下划线都消失了

on all this sort of code: 在所有这些代码上:

OAuthTokens tokens = new OAuthTokens();

when I go to run it(with debug), I get an error: 当我去运行它(使用调试)时,我收到一个错误:

Error 2 The type or namespace name 'Twitterizer' could not be found (are you missing a using directive or an assembly reference?) 错误2找不到类型或命名空间名称“Twitterizer”(您是否缺少using指令或程序集引用?)

Now using Twitterizer; 现在使用Twitterizer;

becomes in error(red and squiggly). 变得错误(红色和波浪形)。 It is like it has been dereferenced. 就像它被解除引用一样。 I add it back and all is well until I run it - arggh 我把它添加回来,一切顺利,直到我运行它 - arggh

TIA TIA

Are you using VS2010? 你在用VS2010吗? If so, try to go project properties -> Application Tab and make sure that you are not using a Framework version that has "client profile" in it. 如果是这样,请尝试转到项目属性 - >应用程序选项卡,并确保您没有使用其中包含“客户端配置文件”的Framework版本。

If you are using VS2010 vb.net you need to go to project properties ->Publish Tab-> Prerequisites 如果您使用的是VS2010 vb.net,则需要转到项目属性 - >发布选项卡 - >先决条件

Uncheck ms .net framework 4 client profile, and check ms .net framework 4 取消选中ms .net framework 4客户端配置文件,然后检查ms .net framework 4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM