7

Closed

ValidateQuery: Method not found: 'Int32 Microsoft.Data.OData.Query.SemanticAst.QueryNode.get_Kind()'.

description

Here's the query that is generating this error in QueryableAttribute.ValidateQuery:<br /><br /><baseurl>?$orderby=Date%20desc&$filter=Date%20ge%20datetime'2012-11-19T00:00:00Z'<br /><br />This worked until very recent builds.<br />
Closed Jan 18, 2013 at 9:21 PM by hongyes
Close as it's versioning issue in nuget.

comments

Geminiman wrote Dec 19, 2012 at 11:58 AM

I should note it's the filter part that is throwing this error
without the filter it's fine.

raghuramn wrote Dec 19, 2012 at 4:39 PM

we found out this issue as well :(. ODataLib(our dependency) has published a new version (5.2.0 RTM) of their package which has some breaking changes. Unfortunately, nuget downloads the latest version of that package due to the way we had our dependencies mentioned.

Please manually uninstall the 5.2.0 version of ODataLib and install 5.2.0-rc1. That should solve this.

Geminiman wrote Dec 19, 2012 at 5:18 PM

Got any instructions on how to accomplish that? Nuget won't let me uninstall it or install the other version?

How about a rev to 5.3 alpha to resolve this?

jongalloway wrote Dec 20, 2012 at 5:15 PM

Here's how I updated to work with 5.2.0-rc1:

PM> uninstall-package Microsoft.Data.OData -force
PM> uninstall-package System.Spatial -force
PM> install-package System.Spatial -Version 5.2.0-rc1
PM> uninstall-package Microsoft.Data.Edm -force
PM> install-package Microsoft.Data.Edm -Version 5.2.0-rc1
PM> install-package Microsoft.Data.OData -Version 5.2.0-rc1

Geminiman wrote Dec 21, 2012 at 6:00 PM

Thanks! Worked! Hope that a permanent solution is coming soon.

grennis wrote Jan 9, 2013 at 7:29 PM

Any news on this? It's been broken for a month now.

raghuramn wrote Jan 9, 2013 at 8:16 PM

This is fixed in the latest nightly builds. Specifically, David's commit http://aspnetwebstack.codeplex.com/SourceControl/changeset/984fad04e2c8 fixed it.

grennis wrote Jan 9, 2013 at 8:28 PM

cool thanks

SEWilson wrote Jan 12, 2013 at 4:14 PM

This appears to still occur even with the most recent NuGet package, am I misunderstanding the latest update to this thread? It seems as though this should be corrected, that 5.2.0 RTM packages are currently preferred?

Is there a manual correction we can perform?

SEWilson wrote Jan 12, 2013 at 4:40 PM

I see, the current WebApi OData 0.30-rc package is out of date and (honestly) shouldn't be live.

This is the only -Pre package in our stack now, and it's the one causing problems, I assume it'll go RTM soonish:

<package id="Microsoft.AspNet.WebApi.OData" version="0.3.0-rc" targetFramework="net45" />

As a work-around, it seems we're all still uninstalling RTM packages as raghuramn suggests:

"Please manually uninstall the 5.2.0 version of ODataLib and install 5.2.0-rc1. That should solve this."

jongalloway posts his PM commands, I'm reposting them without the PM> prefixes for the ease of copy/paste by others. I have done this and can confirm it corrects this issue, I do not see that any core functionality has broken.

"
uninstall-package Microsoft.Data.OData -force
uninstall-package System.Spatial -force
install-package System.Spatial -Version 5.2.0-rc1
uninstall-package Microsoft.Data.Edm -force
install-package Microsoft.Data.Edm -Version 5.2.0-rc1
install-package Microsoft.Data.OData -Version 5.2.0-rc1
"

Can we get an ETA on when a new package would be released? (a non-comittal 0.31-rc would be awesome.)

Thanks!

raghuramn wrote Jan 12, 2013 at 5:05 PM

Are you using the latest nightly build. The latest nightly build is published on myget not on nuget. More about how to get the nightly packages is documented at http://aspnetwebstack.codeplex.com/discussions/353867

oligray wrote Jan 16, 2013 at 4:50 PM

You're a lifesaver SEWilson - thanks for the Nuget Console fix!

Looking forward to the official release of OData for Web API...

neozack wrote Jan 28, 2013 at 6:30 PM

Still no solution?
When is the new version coming out? I do have the same problem here and downgrading to 5.2.0-rc1 is a bit silly, don't you think?

When is next version scheduled?

Mob1us wrote Mar 1, 2013 at 7:04 PM

I don't understand why this issue was closed as it's not resolved. The issue persists in WCF Data Services 5.3.0 RTW.

fotisgpap wrote Dec 13, 2013 at 7:51 PM

Any updates on this issue?