title: Unexplicable error on newer loaded runtime in ASP.NET
body: <p>I have an ASP.NET application</p>
  
  <p>I developed my application pointing as <strong>target Framework the 3.5</strong>. I checked all the projects in the solution and all of them point to 3.5. I checked all the <strong>references</strong> and all of them at the most point to <strong>3.5</strong> (there is some 2.0).</p>
  
  <p>My website is deployed in <strong>IIS 5.0</strong>.</p>
  
  <p>I always receive the following error:</p>
  
  <p><strong>Version Information:</strong> (Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618 ):</p>
  
  <p>*<strong>Could not load file or assembly 'assembly_name' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.*</strong></p>
  
  <pre><code>[BadImageFormatException: Could not load file or assembly 'Iceberg.MVC.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
     System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
     System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
     System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean forIntrospection) +127
     System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean forIntrospection) +142
     System.Reflection.Assembly.Load(String assemblyString) +28
     System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
  
  [ConfigurationErrorsException: Could not load file or assembly 'Iceberg.MVC.Data' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.]
     System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
     System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
     System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
     System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
     System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
     System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
     System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
     System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +83
     System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
     System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
     System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
     System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
     System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
     System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
     System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +160
     System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +93
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +155
  </code></pre>