TFS Build Service生产一个包裹,引用了错误版本的MSSHRTMI(应为1.7,最终引用1.8)



我刚刚为我的项目设置了连续的部署构建(使用Azure TFS服务又称visualstudio.com),但它行之有效。构建似乎很好,部署开始了,但是我的工人角色总是不断回收。我的手册在通过管理门户网站作品部署的Visual Studio中构建很好。当我远离其中一个工人VM查看发生了什么事时,我在日志中发现了这一点:

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:asrcMyProjectDevMyProject.WorkerWorkerRole.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:asrcMyProjectDevMyProject.Worker.CoreRepositoriesTemplateRepository.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(这是我所有项目的实际参考)。2010 and-net-4-0/),似乎都没有用。

还有其他建议吗?

UPDATE :这是我在MSDN论坛上的交叉点的链接

您可以参考Azure组件的1.8版吗?

Microsoft.windowsazure.serviceruntime参考版本1.8版本1.8版本的1.8版,如果目标azure环境没有dll。

,则将失败此消息。

最新更新