Twitterizer 2 and C# - Namespace could not be found
Asked Answered
V

2

10

I have a silly problem with Twitterizer2 and probably me :) . 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.

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?)

Now using 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

TIA

Veratridine answered 17/11, 2010 at 10:58 Comment(0)
F
14

Are you using 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.

Favrot answered 17/11, 2010 at 11:11 Comment(2)
You sir, are a genius :) I have no idea how I would have found that out. Thank you. Now I shall have to read up on what the hell that means.Veratridine
@user510662, thank you. It took me a while to figure out myself, the first time I had a similar problem ;-)Favrot
R
0

If you are using VS2010 vb.net you need to go to project properties ->Publish Tab-> Prerequisites

Uncheck ms .net framework 4 client profile, and check ms .net framework 4

Resee answered 15/12, 2010 at 18:33 Comment(1)
Also change it in the compile tab using these instructions:weblogs.asp.net/jeffwids/archive/2009/12/29/…Resee

© 2022 - 2024 — McMap. All rights reserved.