Azure 部署:无法加载文件或程序集 'dnx.clr.managed' 或其依赖项之一。该系统找不到指定的文件

Azure deployment : Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified

创建一个新的 ASP.NET 5 (MVC 6) 应用程序并部署到 Azure。您得到 HTTP 500 异常。如果您使用以下标记在 wwwroot 文件夹中创建 web.config 文件:

<configuration>
   <system.web>
      <customErrors mode="Off"/>
   </system.web>
</configuration>

你得到了标题中的例外。

出现此错误的一种方法是将 64 位版本(Core 或 x86)部署到免费或共享的 Web 应用程序。如果您在发布对话框中创建 azure web 应用程序,VS 会创建一个免费的 web 应用程序(不支持 64 位)。

当您在 Visual studio 2015 RC 中发布时,在发布网站 "setting" 中:您应该选择 "dnx-clr-win-x64.1.0.0-beta4",而不是 dnx-clr-win-x86.1.0.0-beta4 .