System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.Win

本文关键字:程序集 Win Microsoft 文件 FileNotFoundException IO 加载 System | 更新日期: 2023-09-27 18:11:14

在Azure上,我得到以下错误

先。FileNotFoundException:无法加载文件或程序集ServiceRuntime, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'或其依赖项之一。系统找不到指定的文件。文件名称:Microsoft.WindowsAzure。ServiceRuntime, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'在redacted.Encryption.EncryptionManager.get_storageConectionString ()

第49行

WRN:程序集绑定日志被关闭。要启用程序集绑定失败日志记录,请设置注册表值[HKLM'Software'Microsoft'Fusion!]EnableLog] (DWORD)到1。注意:程序集绑定失败日志记录会带来一些性能损失。要关闭此功能,请删除注册表值[HKLM'Software'Microsoft'Fusion!EnableLog].

System.IO.FileNotFoundException:无法加载文件或程序集'Microsoft.Win

答案是我更新到azure tools 2.7并引用2.5 dll版本。

1)删除对项目中2.5 dll的引用(或.csproj文件),并添加对2.7 System.WindowsAzure.ServiceRuntime dll的引用。

2)重新部署。

3)利润。