AutoUnify 停止从 Azure 2.5 回滚到 Azure 2.3
AutoUnify stopping rollback from Azure 2.5 to Azure 2.3
我的团队最近尝试升级我们的 WorkerRoles 项目以使用 Azure 2.5。但我花了好几天时间解决了一些奇怪的工作者角色回收问题,但由于时间压力,我们正在回滚到 Azure 2.3。
但是,在更改所有引用和 app.config 文件后,当我尝试 运行 时出现以下异常:
System.IO.FileLoadException was unhandled
Message: An unhandled exception of type 'System.IO.FileLoadException' occurred in WaWorkerHost.exe
Additional information: Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我尝试更改 app.config 绑定等。对我来说似乎没问题。然后我注意到错误控制台中的警告:
Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
所以我 运行 使用 "give me lots of info" 设置再次构建,我想我已经找到了问题:
2> Unified Dependency "Microsoft.WindowsAzure.ServiceRuntime, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
2> Using this version instead of original version "2.3.0.0" in "C:\Users\craig.brett\repos\Admin\WorkersPlus\bin\Craig\WorkersPlus.dll" because AutoUnify is 'true'.
2> Resolved file path is "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\ref\Microsoft.WindowsAzure.ServiceRuntime.dll".
...
2> Unified Dependency "Microsoft.WindowsAzure.Diagnostics, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
2> Using this version instead of original version "2.3.0.0" in "C:\Users\craig.brett\repos\Admin\WorkersPlus\bin\Craig\WorkersPlus.dll" because AutoUnify is 'true'.
2> Resolved file path is "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\bin\plugins\Diagnostics\Microsoft.WindowsAzure.Diagnostics.dll".
当我试图让它使用 2.3 时,这一切对我来说都很可疑。我需要做些什么才能回滚到 2.3 吗?我是否必须完全卸载(或尝试卸载)Azure 2.5 SDK?
感谢 Simon Opelt 的评论,我返回并针对受影响项目的更新之前的版本做了 git 差异。
他们透露 Azure Caching NuGet 包以及它的几个子库仍然是 2.5 版。还有一些其他的 Microsoft.* 软件包已经升级了几个版本。所以我使用类似于以下的代码来有选择地完成并还原更改:
git checkout -p <hash of commit prior to Azure upgrade> -- ProjectWorker\ProjectWorker.csproj
git checkout -p <hash of commit prior to Azure upgrade> -- ProjectWorker\packages.config
我没有冒险,还回滚了 Azure ServiceBus 包。
经过这个过程,事情 运行 又好了!没有想象中那么容易,但至少我们又开始工作了,以后可以升级了。
我的团队最近尝试升级我们的 WorkerRoles 项目以使用 Azure 2.5。但我花了好几天时间解决了一些奇怪的工作者角色回收问题,但由于时间压力,我们正在回滚到 Azure 2.3。
但是,在更改所有引用和 app.config 文件后,当我尝试 运行 时出现以下异常:
System.IO.FileLoadException was unhandled
Message: An unhandled exception of type 'System.IO.FileLoadException' occurred in WaWorkerHost.exe
Additional information: Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我尝试更改 app.config 绑定等。对我来说似乎没问题。然后我注意到错误控制台中的警告:
Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.
所以我 运行 使用 "give me lots of info" 设置再次构建,我想我已经找到了问题:
2> Unified Dependency "Microsoft.WindowsAzure.ServiceRuntime, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
2> Using this version instead of original version "2.3.0.0" in "C:\Users\craig.brett\repos\Admin\WorkersPlus\bin\Craig\WorkersPlus.dll" because AutoUnify is 'true'.
2> Resolved file path is "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\ref\Microsoft.WindowsAzure.ServiceRuntime.dll".
...
2> Unified Dependency "Microsoft.WindowsAzure.Diagnostics, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
2> Using this version instead of original version "2.3.0.0" in "C:\Users\craig.brett\repos\Admin\WorkersPlus\bin\Craig\WorkersPlus.dll" because AutoUnify is 'true'.
2> Resolved file path is "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\bin\plugins\Diagnostics\Microsoft.WindowsAzure.Diagnostics.dll".
当我试图让它使用 2.3 时,这一切对我来说都很可疑。我需要做些什么才能回滚到 2.3 吗?我是否必须完全卸载(或尝试卸载)Azure 2.5 SDK?
感谢 Simon Opelt 的评论,我返回并针对受影响项目的更新之前的版本做了 git 差异。
他们透露 Azure Caching NuGet 包以及它的几个子库仍然是 2.5 版。还有一些其他的 Microsoft.* 软件包已经升级了几个版本。所以我使用类似于以下的代码来有选择地完成并还原更改:
git checkout -p <hash of commit prior to Azure upgrade> -- ProjectWorker\ProjectWorker.csproj
git checkout -p <hash of commit prior to Azure upgrade> -- ProjectWorker\packages.config
我没有冒险,还回滚了 Azure ServiceBus 包。
经过这个过程,事情 运行 又好了!没有想象中那么容易,但至少我们又开始工作了,以后可以升级了。