缺少程序集 'dnx.clr.managed'

Missing assembly 'dnx.clr.managed'

我正在尝试将 ASP.NET 5 应用程序部署到我的 64 位 Windows Server 2008 R2 服务器。我创建了一个空白的 Web 应用程序并使用 dnx-clr-win-x64.1.0.0-beta4 设置了一个文件系统发布配置文件。我将结果从发布位置复制到我服务器上的一个文件夹,并创建了一个新的虚拟目录,其中包含指向我应用程序的 wwwroot 文件夹的 .NET 4.0 应用程序池。但是,当我尝试浏览该站点时,出现此错误:

Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'dnx.clr.managed' or one of its dependencies. The system cannot find the file specified.

我的本地 PC(我安装了 Visual Studio 2015)上的相同步骤工作正常,所以我似乎需要在我的服务器上安装其他东西。我已经在此服务器上安装了 .NET 4.6,但没有成功。有谁知道我错过了什么?

由于这个问题,我找到了解决方案:

起初我认为这不是答案,因为当我将我的发布配置文件从 dnx-clr-win-x86.1.0.0-beta4 更改为 dnx-clr-win-x64 时它不起作用。 1.0.0-beta4。但是,后来我注意到 approot/packages 文件夹没有 x64 包。所以我删除了所有内容并重新发布了我的新配置文件并加载了页面。

将依赖文件更改为当前版本,无论是 1.0.0-beta7 还是 1.0.0-beta6 确保您转到 nuget 包管理器并安装适当的版本重建您应该看到文件更新的解决方案你的输出 windows。