Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

Build Error "The type or namespace name 'HttpPost' could not be found"

jonezy's Avatar

jonezy

03 Mar, 2011 03:45 AM

I'm working on an asp.net mvc 2 project and i've got a standard controller with a [HttpPost] attribute on it, when i check my code in with this attribute included i get the above error (don't get this locally obviously). If I take it off the error's gone.

I tried searcing and reading the few kb articles, found nothing.

Any idea's?

  1. 1 Posted by jonezy on 03 Mar, 2011 11:28 PM

    jonezy's Avatar

    Nobody, nothing? This is very frustrating as it doesn't make any sense at all, My entire solution builds and runs fine locally, but fails citing the above error whenever I decorate an action in one of my mvc2 controllers with the [HttpPost] attribute.

    Is this disabled in the build system explicitly?

  2. 2 Posted by jonezy on 03 Mar, 2011 11:35 PM

    jonezy's Avatar

    ok figured this one out on my own. the problem occurs if you have the 1.0 and 2.0 versions of the mvc bits installed on your machine (like me).

    The solution is to remove the System.Web.Mvc reference and re-add it and then set the specific version to true in the properties pane.

    Build works as expected now!

  3. jonezy closed this discussion on 03 Mar, 2011 11:35 PM.

Discussions are closed to public comments.
If you need help with AppHarbor please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac