I am currently following this guide -> Link to asp.net website
As the guide says I added all the necessary packages via the nuget console and added the necessary usings to the WebApIConfig file. . But when I added the endpoint register method VS gave me an error.
The method I added:
public static void Register(HttpConfiguration config)
// New code:
ODataModelBuilder builder = new ODataConventionModelBuilder();
Error 1 'System.Web.Http.HttpConfiguration' does not contain a definition for 'MapODataServiceRoute' and no extension method 'MapODataServiceRoute' accepting a first argument of type 'System.Web.Http.HttpConfiguration' could be found (are you missing a using directive or an assembly reference?) C:\Users\rvcamp\Desktop\odataTest\odataTest\App_Start\WebApiConfig.cs 29 20 odataTest
I just had this problem. Very frustrating.
I resolved it by adding this in the references at the top of the code page
Right clicking the method did not bring up the resolve menu item either.
Reinstalling everything did no resolve anything for me.