title: MVC application crashes due to missing dll reference which exists
body: <p>Similar issue to <a href="https://stackoverflow.com/questions/11071392/the-type-or-namespace-name-does-not-exist-in-the-namespace-system-web-mvc">this</a> question posted on stackoverflow, although I am publishing it to a Windows Server 2008 x64 SP2.</p>
  
  <p>I recently got an upgrade at work from a x86 machine to a x64 (development). Made some changes to my MVC application, re-uploaded it to the above server mentioned, and got the error mentioned below. I haven't changed the config file in any way, in-fact all I did is changed some HTML and JavaScript, re-compiled it and uploaded it. I would suspect something to do with the fact that I recompiled it on my new development machine? Any idea how I may be able to fix this up.</p>
  
  <p>NOTE: The assembly in question indeed exists in the <strong>bin</strong> folder, and is also explicitly set to "copy local".</p>
  
  <pre><code>Compilation Error
  
  
  Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 
  
  Compiler Error Message: CS0234: The type or namespace name 'Html' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)
  
  Source Error:
  
  
  Line 40:         &lt;add namespace="System.Web.Mvc" /&gt;
  Line 41:         &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
  Line 42:         &lt;add namespace="System.Web.Mvc.Html" /&gt;
  Line 43:         &lt;add namespace="System.Web.Optimization" /&gt;
  Line 44:         &lt;add namespace="System.Web.Routing" /&gt;
  
  Source File: c:\inetpub\wwwroot\Heliosphere\Web.config    Line: 42 
  
  
  Show Detailed Compiler Output:
  
  
  C:\Windows\SysWOW64\inetsrv&gt; "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe" /t:library /utf8output /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\e93e1c9f\b98b1573_f50ece01\System.Web.WebPages.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\b748353d\837d0a72_f50ece01\Microsoft.Web.Infrastructure.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\45f37046\60cecf72_f50ece01\System.Web.Helpers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\a622ef58\e3226374_f50ece01\System.Web.Http.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\8400f0b1\ff3e4e72_f50ece01\Newtonsoft.Json.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\97b97546\ab470067_f50ece01\EntityFramework.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\09c804a0\24ca3407_6eb1cd01\System.Threading.Tasks.Dataflow.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\3745d18d\1addb99b_d025ce01\Heliosphere.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\06f8d1b0\c362ac74_f50ece01\System.Web.Http.WebHost.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\9194cd87\76c6aa75_f50ece01\System.Web.Optimization.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\c795b16a\9b58f275_f50ece01\Antlr3.Runtime.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\3b840423\32024717_ce25ce01\Heliosphere.AccessService.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\2305b33a\5efdfdaf_0825ce01\Telstra.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\01bfab33\0c260176_f50ece01\WebGrease.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\4c5a83e9\0d88f172_f50ece01\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\02c0255b\aefdca73_f50ece01\System.Net.Http.Formatting.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\8516d5c4\5cd48a72_f50ece01\System.Web.Razor.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\47ee1890\6fab2273_f50ece01\System.Web.WebPages.Razor.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\5bbddb12\00677eaa_9e8ecd01\Microsoft.Exchange.WebServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\b69a7fa8\0e2c1275_f50ece01\System.Web.Providers.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\assembly\dl3\3c0808a8\1c17df16_ce25ce01\Heliosphere.Model.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\App_global.asax.ilahar0n.dll" /debug- /optimize+ /w:4 /nowarn:1659;1699;1701;612;618 /warnaserror-  "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\App_global.asax.ilahar0n.0.cs" "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\904c6749\773dc9\App_global.asax.ilahar0n.1.cs"
  
  
  Microsoft (R) Visual C# Compiler version 4.0.30319.17929
  
  for Microsoft (R) .NET Framework 4.5
  Copyright (C) Microsoft Corporation. All rights reserved.
  
  c:\inetpub\wwwroot\Heliosphere\Web.config(42,26): error CS0234: The type or namespace name 'Html' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)
  c:\inetpub\wwwroot\Heliosphere\Web.config(41,26): error CS0234: The type or namespace name 'Ajax' does not exist in the namespace 'System.Web.Mvc' (are you missing an assembly reference?)
  </code></pre>