.

Solved – The type or namespace IHttpActionResult not found (Web API 2 error)

Trying to use Web API 2 but getting the following error:
error CS0246: The type or namespace name ‘IHttpActionResult’ could not be found (are you missing a using directive or an assembly reference?)

Solution:

Tools – > Library Package Manager -> Package Manager Console, then type:

Install-Package Microsoft.AspNet.WebApi -Version 5.0.0

sometimes you must try:

update-Package Microsoft.AspNet.WebApi –reinstall

 

4 Responses to this post.

  1. Posted by koushik on 11.09.14 at 6:06 pm

    I Have tried both stepos but i am not able to get it

  2. Posted by pietman on 11.09.14 at 6:06 pm

    What exactly is the error you’re getting and what is the context of your problem?

  3. Posted by Joe V on 11.09.14 at 6:06 pm

    The reinstall worked for me. Thank you!

  4. Posted by Baseer on 11.09.14 at 6:06 pm

    Thanks alot man, it works for me.

What's your thoughts on this?

*

Protected by WP Anti Spam