服务结构升级在VSTS构建服务器

时间:2017-06-21 07:58:05

标签: continuous-integration tdd azure-service-fabric azure-pipelines

我们已将Service Fabric SDK和工具从2.5.216升级到2.6.210。

现在,当我们在VSTS托管代理上运行构建时,构建在验证测试阶段失败,该阶段通过vstest.exe运行specflow验收测试。

错误是:

无法加载类型' Microsoft.ServiceFabric.Data.Collections.IReliableConcurrentQueue`1'来自assembly' Microsoft.ServiceFabric.Data.Interfaces,Version = 5.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'。"," exceptionType":" System .TypeLoadException"

测试使用相同的vstest.exe命令在本地(安装了Microsoft Azure Service Fabric SDK和Tools 2.6.210(VS2015))。

查看了托管代理的规范(https://www.visualstudio.com/en-us/docs/build/concepts/agents/hosted) 我们注意到代理上安装的版本是Service Fabric 5.4.164.9494 / Service Fabric SDK 2.4.164,并怀疑这些 需要更新。

更长版本的错误

  

2017-06-20T15:11:00.0331094Z失败我可以提出更改请求   游戏类型的分配2017-06-20T15:11:00.0331094Z

     

[错误]错误消息:2017-06-20T15:11:00.0341044Z ## [错误] System.Exception:不匹配的响应代码:InternalServerError -

     

{" message":"发生错误。"," exceptionMessage":"无法加载   类型   ' {Microsoft.ServiceFabric.Data.Collections.IReliableConcurrentQueue {1}} 1.MoveNext(个)\ r \ n ---   从抛出异常的先前位置开始的堆栈跟踪结束   --- \ r \ n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务   任务)\ r \ n at   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务   任务)\ r \ n at   System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext(个)\ r \ n ---   从抛出异常的先前位置开始的堆栈跟踪结束   --- \ r \ n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务   任务)\ r \ n at   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务   任务)\ r \ n at   System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext(个)\ r \ n ---   从抛出异常的先前位置开始的堆栈跟踪结束   --- \ r \ n在System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\ r \ n ---   从抛出异常的先前位置开始的堆栈跟踪结束   --- \ r \ n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务   任务)\ r \ n at   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务   任务)\ r \ n at   System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext(个)\ r \ n ---   从抛出异常的先前位置开始的堆栈跟踪结束   --- \ r \ n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务   任务)\ r \ n at   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务   任务)\ r \ n at   System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext(个)\ r \ n ---   从抛出异常的先前位置开始的堆栈跟踪结束   --- \ r \ n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务   任务)\ r \ n at   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务   任务)\ r \ n at   System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext(个)\ r \ n ---   从抛出异常的先前位置开始的堆栈跟踪结束   --- \ r \ n在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务   任务)\ r \ n at   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务   任务)\ r \ n at   System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"}   2017-06-20T15:11:00.0341044Z ## [错误]堆栈跟踪:   2017-06-20T15:11:00.0341044Z ## [错误]在   Infrastructure.TestHelpers.AcceptanceTests.ResponseHelper.AssertResponseHadExpectedStatusCode(的Int32   expectedStatusCode)in   d:\一个\ 1 \ S \基础设施\ Infrastructure.TestHelpers \ AcceptanceTests \ ResponseHelper.cs:线   25 2017-06-20T15:11:00.0341044Z ## [错误] at   xwx.AcceptanceTests.ResponseSteps.ThenIShouldReceiveAHttpStatusCode(的Int32   expectedStatusCode)in   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \ ResponseSteps.cs:线   12 2017-06-20T15:11:00.0341044Z ## [错误] at   TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding   绑定,IContextManager contextManager,Object []参数,   ITestTracer testTracer,TimeSpan&持续时间)   2017-06-20T15:11:00.0351049Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch   match,Object [] arguments)2017-06-20T15:11:00.0351049Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance   stepInstance)2017-06-20T15:11:00.0351049Z ## [错误]在   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()   2017-06-20T15:11:00.0351049Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ScenarioCleanup()   2017-06-20T15:11:00.0351049Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ICanMakeARequestToChangeTheAllocationOfAgameType()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ ChangeAllocation.feature:线   43错误消息:2017-06-20T15:11:00.0351049Z ## [错误]
  System.Exception:不匹配的响应代码:NoContent -   2017-06-20T15:11:00.0351049Z ## [错误]堆栈追踪:   2017-06-20T15:11:00.0351049Z ## [错误] at   Infrastructure.TestHelpers.AcceptanceTests.ResponseHelper.AssertResponseHadExpectedStatusCode(的Int32   expectedStatusCode)in   d:\一个\ 1 \ S \基础设施\ Infrastructure.TestHelpers \ AcceptanceTests \ ResponseHelper.cs:线   25 2017-06-20T15:11:00.0351049Z ## [错误] at   xwx.AcceptanceTests.gameTypes.gameTypesSteps.WhenTheChangeHasCompleted()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ gameTypesSteps.cs:线   167 2017-06-20T15:11:00.0351049Z ## [错误] at   TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding   绑定,IContextManager contextManager,Object []参数,   ITestTracer testTracer,TimeSpan&持续时间)   2017-06-20T15:11:00.0351049Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch   match,Object [] arguments)2017-06-20T15:11:00.0351049Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance   stepInstance)2017-06-20T15:11:00.0351049Z ## [错误]在   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()   2017-06-20T15:11:00.0351049Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ScenarioCleanup()   2017-06-20T15:11:00.0361050Z 2017-06-20T15:11:00.0361050Z我失败了   可以增加分配2017-06-20T15:11:00.0361050Z   2017-06-20T15:11:01.5390956Z ## [错误]在   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ICanIncreaseTheAllocation()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ ChangeAllocation.feature:线   52错误消息:2017-06-20T15:11:01.5400956Z ## [错误]
  System.Exception:不匹配的响应代码:NoContent -   2017-06-20T15:11:01.5400956Z ## [错误]堆栈跟踪:   2017-06-20T15:11:01.5400956Z ## [错误] at   Infrastructure.TestHelpers.AcceptanceTests.ResponseHelper.AssertResponseHadExpectedStatusCode(的Int32   expectedStatusCode)in   d:\一个\ 1 \ S \基础设施\ Infrastructure.TestHelpers \ AcceptanceTests \ ResponseHelper.cs:线   25 2017-06-20T15:11:01.5400956Z ## [错误] at   xwx.AcceptanceTests.gameTypes.gameTypesSteps.WhenTheChangeHasCompleted()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ gameTypesSteps.cs:线   167 2017-06-20T15:11:01.5400956Z ## [错误] at   TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding   绑定,IContextManager contextManager,Object []参数,   ITestTracer testTracer,TimeSpan&持续时间)   2017-06-20T15:11:01.5400956Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch   match,Object [] arguments)2017-06-20T15:11:01.5400956Z ## [error] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance   stepInstance)2017-06-20T15:11:01.5400956Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()   2017-06-20T15:11:01.5400956Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ScenarioCleanup()   2017-06-20T15:11:01.5400956Z失败如果我试图减少   分配下面可用的游戏数量我只能减少   分配给总可用2017-06-20T15:11:01.5400956Z   2017-06-20T15:11:03.0426998Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.IfITryToReduceTheAllocationBelowTheNumberOfgamesAvailableICanOnlyReduceTheAllocationToTheTotalAvailable()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ ChangeAllocation.feature:线   70错误消息:2017-06-20T15:11:03.0426998Z ## [错误]
  System.Exception:不匹配的响应代码:NoContent -   2017-06-20T15:11:03.0426998Z ## [错误]堆栈跟踪:   2017-06-20T15:11:03.0426998Z ## [错误] at   Infrastructure.TestHelpers.AcceptanceTests.ResponseHelper.AssertResponseHadExpectedStatusCode(的Int32   expectedStatusCode)in   d:\一个\ 1 \ S \基础设施\ Infrastructure.TestHelpers \ AcceptanceTests \ ResponseHelper.cs:线   25 2017-06-20T15:11:03.0437002Z ## [错误] at   xwx.AcceptanceTests.gameTypes.gameTypesSteps.WhenTheChangeHasCompleted()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ gameTypesSteps.cs:线   167 2017-06-20T15:11:03.0437002Z ## [错误] at   TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding   绑定,IContextManager contextManager,Object []参数,   ITestTracer testTracer,TimeSpan&持续时间)   2017-06-20T15:11:03.0437002Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch   match,Object [] arguments)2017-06-20T15:11:03.0437002Z ## [error] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance   stepInstance)2017-06-20T15:11:03.0437002Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()   2017-06-20T15:11:03.0437002Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ScenarioCleanup()   2017-06-20T15:11:03.0437002Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ICanReduceTheAllocationByTheNumberOfgamesStillAvailable()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ ChangeAllocation.feature:线   61错误消息:2017-06-20T15:11:03.0437002Z ## [错误]
  System.Exception:不匹配的响应代码:NoContent -   2017-06-20T15:11:03.0437002Z ## [错误]堆栈跟踪:   2017-06-20T15:11:03.0437002Z ## [错误] at   Infrastructure.TestHelpers.AcceptanceTests.ResponseHelper.AssertResponseHadExpectedStatusCode(的Int32   expectedStatusCode)in   d:\一个\ 1 \ S \基础设施\ Infrastructure.TestHelpers \ AcceptanceTests \ ResponseHelper.cs:线   25 2017-06-20T15:11:03.0437002Z ## [错误] at   xwx.AcceptanceTests.gameTypes.gameTypesSteps.WhenTheChangeHasCompleted()   在   d:\一个\ 1 \ S \测试\编排\ xwx \ xwx.AcceptanceTests \游戏类型\ gameTypesSteps.cs:线   167 2017-06-20T15:11:03.0437002Z ## [错误] at   TechTalk.SpecFlow.Bindings.BindingInvoker.InvokeBinding(IBinding   绑定,IContextManager contextManager,Object []参数,   ITestTracer testTracer,TimeSpan&持续时间)   2017-06-20T15:11:03.0437002Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStepMatch(BindingMatch   match,Object [] arguments)2017-06-20T15:11:03.0437002Z ## [error] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.ExecuteStep(StepInstance   stepInstance)2017-06-20T15:11:03.0437002Z ## [错误] at   TechTalk.SpecFlow.Infrastructure.TestExecutionEngine.OnAfterLastStep()   2017-06-20T15:11:03.0437002Z ## [错误] at   xwx.AcceptanceTests.gameTypes.ChangeAllocation3532Feature.ScenarioCleanup()   2017-06-20T15:11:03.0437002Z失败我可以减少分配   游戏数量仍然可用2017-06-20T15:11:03.0437002Z

2 个答案:

答案 0 :(得分:0)

即使您在构建服务器上指定平台目标x64,也请检查项目构建配置以查看Release是否设置为platform target x64。

还要确保构建服务器安装了最新的Service Fabric SDK。有问题的构建可能会从GAC中获取旧程序集。

这是我得到的错误,

System.TypeLoadException: Could not load type 'Microsoft.ServiceFabric.Data.IReliableStateManagerReplica2' from assembly 'Microsoft.ServiceFabric.Data.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

答案 1 :(得分:-1)

您可以通过安装SDK only包使用Microsoft.ServiceFabric.Services。托管代理可以为我工作。

相关问题