Home > ASP.NET, Azure > Azure TableServiceContext presents an error with CreateQuery function

Azure TableServiceContext presents an error with CreateQuery function

If you were using azure table storage and found the following error when writing the CreateQuery function

image

does not contain a definition for’ ‘CreateQuery’ and no extension method ‘CreateQuery’ accepting a first argument of type..

 

What is happening is that other than adding Microsoft.WindowsAzure.StorageClient, you aldo need to add System.Data.Services.Client, which Visual Studio actually tells you when you attempt to build the project.

 

Error    1    The type ‘System.Data.Services.Client.DataServiceContext’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.   

 

Once you added the reference, the error will automatically go away.

 

Now if only there was an easy way to automatically add the missing reference in since Visual Studio knows the exact error and also what should be done..

About these ads
Categories: ASP.NET, Azure
  1. Lincoln
    May 8, 2012 at 2:48 am
  2. DZ
    November 26, 2012 at 3:42 am

    GREAT!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: