【问题标题】:Azure Web App suddenly throws HTTP Error 500.31 - ANCM Failed to Find Native Dependencies in .NET 6 (preview)Azure Web App 突然抛出 HTTP 错误 500.31 - ANCM 无法在 .NET 6 中查找本机依赖项(预览版)
【发布时间】:2021-09-18 13:10:29
【问题描述】:

我总是在开发过程中部署我的 Azure Web App。我突然更新了我的 Visual Studio 2022(预览版),发布后 Web App 上出现以下错误:

HTTP Error 500.31 - ANCM Failed to Find Native Dependencies 

如何进一步调试?我尝试在 Azure 门户中使用控制台,但在 Azure Web 应用程序的任何地方都找不到 .NET 6。或者实际上我如何将网络应用程序上的版本与我自己的版本相匹配?正如我之前提到的,我不知道运行时在 Web 应用程序上的安装位置。

【问题讨论】:

    标签: .net asp.net-mvc asp.net-core azure-web-app-service .net-6.0


    【解决方案1】:

    基于MS Doc

    此版本不是“上线”,也不打算用于生产 计算机或用于创建生产代码。有关说明 安装和更新 Visual Studio 2022,请参阅本文档 updating Visual Studio 2022 to the most recent release.

    对于这个错误

    HTTP Error 500.31 - ANCM Failed to Find Native Dependencies 
    

    您可以尝试卸载所有 EF Core nuget packages 并重新安装它们。

    更多信息请参考以下链接:

    500.31 ANCM Failed to Find Native Dependencies | MS DOC

    .Troubleshooting 500.31 ANCM on Azure App Service | SO THREAD.

    .Early Access Runtime | GitHub

    【讨论】:

    • 我已经尝试将环境设置为开发,它似乎不会引发任何更确切的错误...我尝试列出包或使用 NuGet 更新它们,但都失败了...甚至自我更新nuget.exe 失败...此时我非常绝望
    【解决方案2】:

    解决方案是根据您在 Visual Studio 中的部署选择转到project folder/bin/DebugRelease,然后将projectnamehere.runtimeconfig.json 文件编辑为正确的版本号。

    您可以通过 Azure 门户中的控制台进入 wwwroot(默认情况下应该是默认路径),然后执行dotnet projectname.dll,从而找出正确的运行时版本号。

    结案。

    【讨论】:

      猜你喜欢
      • 2019-10-30
      • 2020-08-14
      • 2020-01-28
      • 1970-01-01
      • 1970-01-01
      • 2020-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多