gpt4 book ai didi

azure - TFS 构建服务生成一个包,其中引用了错误版本的 msshrtmi(应该是 1.7,最终引用了 1.8)

转载 作者:行者123 更新时间:2023-12-03 00:16:25 25 4
gpt4 key购买 nike

我刚刚为我的项目设置了持续部署构建(使用 azure TFS 服务,又名 Visualstudio.com),但它无法正常工作。构建似乎很好,并且部署开始,但我的辅助角色总是不断循环。我的手册在 Visual Studio 中构建,通过管理门户部署,工作得很好。当我远程访问其中一个工作虚拟机以查看发生了什么时,我在事件日志中发现了以下内容:

An unhandled exception occurred. Type: Autofac.Core.DependencyResolutionException Process ID: 2488
Process Name: WaWorkerHost
Thread ID: 13
AppDomain Unhandled Exception for role MyProject.Worker_IN_1
Exception: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.WindowsAzure.CloudStorageAccount)' on type 'TemplateRepository'.
at MyProject.Worker.WorkerRole.Run() in c:\a\src\MyProject\Dev\MyProject.Worker\WorkerRole.cs:line 383
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<startrole>b__1()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Inner Exception: The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception.
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName)
at MyProject.Worker.Core.Repositories.TemplateRepository..ctor(CloudStorageAccount account) in c:\a\src\MyProject\Dev\MyProject.Worker.Core\Repositories\TemplateRepository.cs:line 24
at lambda_method(Closure , Object[] )
at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()

Inner Exception: Could not load file or assembly 'msshrtmi, Version=1.8.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)
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeEnvironment()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment..cctor()

似乎由于某种原因,在 TFS 构建服务器上执行的构建最终错误地引用了 msshrtmi 版本 1.8,而不是 1.7(这是我所有项目实际引用的版本)。我尝试添加 msshrtmi 的显式引用,并且还尝试了此处找到的建议(http://tomkrueger.wordpress.com/2010/07/27/azure-deployment-issue-after-upgrading-to-visual-studio- 2010-and-net-4-0/),但似乎都不起作用。

还有其他建议吗?

更新:这是我的 cross-post on MSDN forums 的链接

最佳答案

您能否引用 1.8 版本的 Azure 程序集?

1.8 版本的 Microsoft.WindowsAzure.ServiceRuntime 引用了 1.8 版本的 msshrtmi.dll,如果目标 Azure 环境没有该 dll,则会失败并显示此消息。

关于azure - TFS 构建服务生成一个包,其中引用了错误版本的 msshrtmi(应该是 1.7,最终引用了 1.8),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13996561/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com