Azure devops AzureDevops无法生成XUnit测试,生成错误:以下方法之间的调用不明确
每当我们将引发异常的本地函数传递给Assert.Throws时,Assert.Throws(Action)和Assert.Throws(Func)之间就会发生不明确的调用 错误不会在本地发生,但在运行生成管线时会发生 能够通过以下方式回购:Azure devops AzureDevops无法生成XUnit测试,生成错误:以下方法之间的调用不明确,azure-devops,xunit,Azure Devops,Xunit,每当我们将引发异常的本地函数传递给Assert.Throws时,Assert.Throws(Action)和Assert.Throws(Func)之间就会发生不明确的调用 错误不会在本地发生,但在运行生成管线时会发生 能够通过以下方式回购: void iut() => throw new NotImplementedException(); Assert<NotImplentedException>(iut); 目前我们有两个简单的解决方法:1)不使用局部函数[LAME]2)
void iut() => throw new NotImplementedException();
Assert<NotImplentedException>(iut);
目前我们有两个简单的解决方法:1)不使用局部函数[LAME]2)将每个局部函数转换为动作[LAME]
trigger:
- master
pool:
vmImage: 'Ubuntu-16.04'
variables:
buildConfiguration: 'Release'
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: '**/*.Tests.csproj'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'