Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building solution fails in Azure DevOps pipeline #1986

Closed
9 of 10 tasks
godrose opened this issue May 12, 2020 · 7 comments
Closed
9 of 10 tasks

Building solution fails in Azure DevOps pipeline #1986

godrose opened this issue May 12, 2020 · 7 comments

Comments

@godrose
Copy link

godrose commented May 12, 2020

SpecFlow Version:

  • 3.1

Used Test Runner

  • Xunit

Version number: 2.4.1

Project Format of the SpecFlow project

  • Sdk-style project format

.feature.cs files are generated using

  • SpecFlow.Tools.MsBuild.Generation NuGet package

Visual Studio Version

  • VS 2019

Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings

  • Disabled

Are the latest Visual Studio updates installed?

  • Yes

.NET Version:

  • .NET Core 3.1

Test Execution Method:

  • Visual Studio Test Explorer
  • TFS/VSTS/Azure DevOps – See the repo

<SpecFlow> Section in app.config or content of specflow.json

See the repo

Repro Project

https://github.com/LogoFX/cli-dotnet/tree/feature/azure-pipelines

Issue Description

This is the error:
C:\Users\VssAdministrator.nuget\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [D:\a\1\s\specs\LogoFX.Cli.Dotnet.Specs.Features\LogoFX.Cli.Dotnet.Specs.Features.csproj]
C:\Users\VssAdministrator.nuget\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'TechTalk.SpecFlow, Version=3.1.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41'. The system cannot find the file specified. [D:\a\1\s\specs\LogoFX.Cli.Dotnet.Specs.Features\LogoFX.Cli.Dotnet.Specs.Features.csproj]
C:\Users\VssAdministrator.nuget\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: File name: 'TechTalk.SpecFlow, Version=3.1.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41' [D:\a\1\s\specs\LogoFX.Cli.Dotnet.Specs.Features\LogoFX.Cli.Dotnet.Specs.Features.csproj]

Steps to Reproduce

Run the job - the error is very consistent.

The question here is whether you saw this before. Maybe something's wrong with the .yaml file

@SabotageAndi
Copy link
Contributor

It's #1912
Please update to the latest 3.3-beta packages.

@godrose
Copy link
Author

godrose commented May 12, 2020

@SabotageAndi I’m using .net 5 preview 3 as for sdk. Also this seems to work at another ci provider (appveyor) and locally as well

@SabotageAndi
Copy link
Contributor

The .NET 5 preview SDK has the different behavior in assembly loading in MSBuild Task that was introduced with .NET Core 3.1.200 SDK.
And the bug because of this behavior is fixed with SpecFlow 3.3.

Please check that you have everywhere the same SDK installed and that the value of the workaround environment variable (MSBUILDSINGLELOADCONTEXT) is everywhere the same.

@SabotageAndi SabotageAndi reopened this May 12, 2020
@godrose
Copy link
Author

godrose commented May 12, 2020

@SabotageAndi If I'm using 3.3 I don't need to use the env var, right?

@SabotageAndi
Copy link
Contributor

Yes, no need for env variable with SpecFlow 3.3

@godrose
Copy link
Author

godrose commented May 12, 2020

I'll switch to this version then. Thanks a lot!

@godrose godrose closed this as completed May 12, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants