【问题标题】:Could not load file or assembly 'msshrtmi' - when publishing Windows Azure Websites无法加载文件或程序集“msshrtmi” - 发布 Windows Azure 网站时
【发布时间】:2014-09-02 04:20:18
【问题描述】:

我遇到以下问题:

 Could not load file or assembly 'msshrtmi, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 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 'msshrtmi, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'msshrtmi, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' could not be loaded.


WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

此问题仅在发布到 Windows Azure 网站 (WAWS) 时发生。我想检测我是否在 Windows Azure 模式下运行。这在 WAWS 中可行吗?仅当我调用Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.IsAvailable 时才会发生此错误。

我假设 WAWS 环境会安装 Azure SDK,对吗?还是仅适用于云服务?

我查看了一些解决方案,告诉您手动将其包含在 x64 或 x86 版本中,但我不希望受到这种限制或类似的解决方法。

【问题讨论】:

标签: azure azure-web-roles


【解决方案1】:

我在发布 Web 应用时遇到了同样的错误。在尝试了网络上的所有其他解决方案之后,以下方法终于对我有用:

在 Azure 门户中,选择您的 Web 应用程序。选择“设置 > 应用程序设置”。将平台值从 32 位更改为 64 位。重新发布。

【讨论】:

    猜你喜欢
    • 2014-10-22
    • 2013-12-17
    • 1970-01-01
    • 2017-12-23
    • 2012-01-06
    • 2013-01-29
    • 1970-01-01
    • 2019-06-04
    • 1970-01-01
    相关资源
    最近更新 更多