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

"Could not find build environment" on large sln file. #2449

Closed
petertiedemann opened this issue Mar 30, 2023 · 5 comments
Closed

"Could not find build environment" on large sln file. #2449

petertiedemann opened this issue Mar 30, 2023 · 5 comments
Labels
🐛 Bug Something isn't working

Comments

@petertiedemann
Copy link

Describe the bug
Running stryker against a large sln file ( 278 projects) on a 5950x (16c/32t) CPU leads to multiple "Could not find build environment" errors.

Logs
I couldn't figure out how to output the log when running from a configuration file, but a snippet is included here, please see additional context below.

Unhandled exception. System.AggregateException: One or more errors occurred. (Could not find build environment) (Could not find build environment) (Could not find build environment) (Could not find build environment) (Could not find build environment) (Could not find build environment) (Could not find build environment)
 ---> System.InvalidOperationException: Could not find build environment
   at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework, EnvironmentOptions options)
   at Buildalyzer.Environment.EnvironmentFactory.GetBuildEnvironment(String targetFramework)
   at Buildalyzer.ProjectAnalyzer.Build(String targetFramework)
   at Buildalyzer.ProjectAnalyzer.Build()
   at Stryker.Core.Initialisation.ProjectOrchestrator.<>c__DisplayClass7_0.<AnalyzeSolution>b__0(IProjectAnalyzer project) in /_/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs:line 124
   at System.Threading.Tasks.Parallel.<>c__DisplayClass33_0`2.<ForEachWorker>b__0(Int32 i)
   at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`1.<ForWorker>b__1(RangeWorker& currentWorker, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)

Expected behavior
No failures

Desktop (please complete the following information):

  • OS: Windows 11
  • Type of project: mix, but everything builds using "dotnet build"
  • Framework Version net60+net472
  • Stryker Version 3.7.1

Additional context
The underlying issue appears to be from Buildalyzer, where I have reported this:
phmonte/Buildalyzer#227

I suspect it could also be worked around from stryker by limiting the concurrency (for example using the value of -c CLI flag here as well)?

@petertiedemann petertiedemann added the 🐛 Bug Something isn't working label Mar 30, 2023
@richardwerkman
Copy link
Member

richardwerkman commented Apr 14, 2023

I've encountered this behaviour as well now. But I've seen it only once so it seems flaky behaviour. Was yours also flaky or did you encounter this on every run?

OS: MacOS
Framework Version net6.0
Stryker Version 3.7.1

@JustineSondore
Copy link

Not much of substance to add, but I've also encountered this error.

  • Framework Version net6.0
  • Stryker Version 3.7.1

Solution is not that large, ~30 projects.
Stryker.Net runs fine on the solution on my developer's machine (win).
But in the Azure pipelines it keeps throwing the above mentioned errors on one of the build agents. Yet on another build agent it runs fine, and unfortunately I don't really know how the "bad" agent is different.

@rouke-broersma
Copy link
Member

@JustineSondore are they the same vm type?

@petertiedemann
Copy link
Author

@richardwerkman It always failed for me, but in slightly different ways each time if I recall correctly.

@dupdob
Copy link
Member

dupdob commented Jul 18, 2024

The underlying Buildalyzer have been closed, fix has been delivered and Stryker integrated it.
Closing it as fixed

@dupdob dupdob closed this as completed Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants