Search code examples
asp.net-mvcazureasp.net-mvc-4azure-web-roles

Azure Cloud Service Deployment: The type or namespace name 'Helpers' does not exist


I configured an MVC4 Web Role on my Azure Project. Locally (on the emulator) it works fine. I keep getting this error at runtime:

The type or namespace name 'Helpers' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?)

I've tried:

  • Adding the System.Web.Helpers DLL directly into the BIN Folder
  • Referencing the Assembly on the project and setting CopyLocal=true
  • Connected to remote desktop on the azure cloud service and installed MVC on the server to see if that was the issue. It still persists.

Solution

  • OK, so I ended up deleting the reference to System.Web.Helpers and installing the nuget Package Microsoft-Web-Helpers.

    This solved the problem.