【问题标题】:Running asp.net 5 website in IIS 10 throws Couldn't determine an appropriate version of runtime to run error在 IIS 10 中运行 asp.net 5 网站会引发无法确定运行时的适当版本来运行错误
【发布时间】:2015-11-25 08:47:01
【问题描述】:

我刚刚在 Visual Studio 2015 中创建了一个新的 ASP.NET 5 Web 应用程序。它在 IIS Express 下运行良好,但是当我在 Windows 10 上的 IIS 10 中创建一个站点并将其指向 wwwroot 文件夹时,我获得 YSOD:

无法确定要运行的适当版本的运行时

这已经讨论过elsewhere,但在我的情况下,project.json 文件看起来不错:

"frameworks": {
  "dnx451": { },
  "dnxcore50": { }
},

与其他帖子一样,这是dmvm list 的输出:

Active Version     Runtime Architecture Location                     Alias
------ -------     ------- ------------ --------                     -----
       1.0.0-beta5 clr     x64          C:\Users\Simon\.dnx\runtimes
       1.0.0-beta5 clr     x86          C:\Users\Simon\.dnx\runtimes
       1.0.0-beta5 coreclr x64          C:\Users\Simon\.dnx\runtimes
       1.0.0-beta5 coreclr x86          C:\Users\Simon\.dnx\runtimes

所有的依赖都是beta5 in project.json

还有其他人可以在 Windows 10 上使用 IIS 吗?

【问题讨论】:

  • 我还没有尝试过 Windows 10,但是您是否尝试过控制台方法并运行 dnu publish?我知道我在忽略或记录不足的微小调整方面遇到了麻烦,并且使用 --runtime 选项强制运行时有所帮助。编辑

标签: iis asp.net-core iis-10


【解决方案1】:

我只是在做了一些研究之后才注意到(我在自己的工作中已经克服了很多 ASP .Net5 障碍——我在 beta 5 和 6 之间遇到了这个错误......正在与架构差异作斗争。一件事让我走上正轨的是我跑了

dnvm use {version u need} 并在命令行上执行了dnu restore。我注意到您在 dnvm 列表输出中没有默认值,因此它可能正在尝试将多个运行时发布到您的项目输出目录。我会调查 ./approot/runtimes/... 看看有多少不同的运行时;应该只有一个。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-09-26
    • 1970-01-01
    • 2018-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-28
    相关资源
    最近更新 更多