Problems Building & Running Source Code

Oct 10, 2014 at 3:42 AM
I'm trying to get started by finding some decent code samples for querying user information. I downloaded the Source Code solution and am attempting to run it with the LinqToTwitterDemos_WebForms as the start-up project. The problem is I can't get the solution to compile in Visual Studio 2013.

Immediately when I load the solution, I get a bunch of errors in LinqToTwitterDemoVB.
  • Type 'IOAuthCredentials' is not defined.
  • Type 'PinAuthorizer' is not defined.
  • Type 'Status' is not defined.
  • Type 'TwitterContext' is not defined.
    etc.
If I unload the LinqToTwitterDemoVB project and try to build the solution, I get 2 errors in LinqToTwitterDemos_WebForms:

Error 1 Metadata file 'C:\projects\aspProjects\Reference\General\linqtotwitter-3-0-4\LinqToTwitter.AspNet\bin\Debug\LinqToTwitter.AspNet.dll' could not be found C:\projects\aspProjects\Reference\General\linqtotwitter-3-0-4\Linq2TwitterDemos_WebForms\CSC Linq2TwitterDemos_WebForms

Error 2 Metadata file 'C:\projects\aspProjects\Reference\General\linqtotwitter-3-0-4\LinqToTwitterPcl\bin\Debug\LinqToTwitterPcl.dll' could not be found C:\projects\aspProjects\Reference\General\linqtotwitter-3-0-4\Linq2TwitterDemos_WebForms\CSC Linq2TwitterDemos_WebForms

When I look for those DLLs they are indeed missing. Am I doing something wrong to get the sample site working?
Coordinator
Oct 10, 2014 at 11:00 PM
Hi,

The latest version of LINQ to Twitter is v3.0.4, which is probably what you're using. If so, the demos you need are in the Linq2TwitterDemos_WebForms project. All of the new demos have a prefix of Linq2TwitterDemos I know it's confusing and I have an open issue to organize and refactor projects to make it easier to navigate the source code.

@JoeMayo
Oct 11, 2014 at 7:24 AM
Thanks Joe.

I've discerned that much but my problem is that the solution does not build after download. I've tried to unload the problematic projects, but even still I can't get the Linq2TwitterDemos_WebForms project to run because of the errors listed above.

It's very discouraging when you can't even get the latest code to compile, especially for someone who is just looking for simple examples to get started. Thanks for making the effort to simplify things!
Coordinator
Oct 12, 2014 at 12:34 AM
Double-check your references and make sure you have one to LinqToTwitterPcl.dll. There's also an HttpClient dependency. You can probably do a NuGet package update.

More info - I'm using VS 2013 with all the latest updates, including NuGet.
Coordinator
Oct 12, 2014 at 6:33 AM
Also, make sure you're opening the LinqToTwitterPcl.sln solution, which is for the v3.0 code.
Oct 12, 2014 at 5:02 PM
Thanks Joe, it looks like I was opening up the wrong solution.

After opening LinqToTwitterPcl.sln and starting the "ASP.net State Service" through administrative tools I was able to get the Oauth page to properly load.
Oct 15, 2014 at 8:22 AM
Edited Oct 15, 2014 at 8:24 AM
Hi,

I'm getting compile time error in windows store app.
private async void TwitterSignIn()
{
var auth = new LinqToTwitter.WindowsStore.WindowsStoreAuthorizer
            {
                CredentialStore = new InMemoryCredentialStore
                {
                    ConsumerKey = "Consumer_Key",
                    ConsumerSecret ="Secret"
                },
                Callback = "Callback url"
            };
}
Error 8 The type or namespace name 'WindowsStore' does not exist in the namespace 'LinqToTwitter' (are you missing an assembly reference?)
Coordinator
Oct 16, 2014 at 1:28 AM
Hi,

I think you need to add a reference to the LinqToTwitter.WindowsStore project. The reason it's like this is because LinqToTwitterPcl is a PCL, which is platform independent. Whenever, there's a platform-dependent feature, I need to create a platform-specific library for that code.

@JoeMayo