question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled exception. System.ComponentModel.Win32Exception (2): No such file or directory

See original GitHub issue

Describe the bug When running dotnet-stryker I get the error

Logs
dotnet-stryker -s ../../Brand.CustomerData.sln -l trace

   _____ _              _               _   _ ______ _______  
  / ____| |            | |             | \ | |  ____|__   __| 
 | (___ | |_ _ __ _   _| | _____ _ __  |  \| | |__     | |    
  \___ \| __| '__| | | | |/ / _ \ '__| | . ` |  __|    | |    
  ____) | |_| |  | |_| |   <  __/ |    | |\  | |____   | |    
 |_____/ \__|_|   \__, |_|\_\___|_| (_)|_| \_|______|  |_|    
                   __/ |                                      
                  |___/                                       


Version: 0.22.11

[14:30:35 INF] Logging enabled at level Info
[14:30:35 DBG] Stryker started with options: {"BasePath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests","SolutionPath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/../../Brand.CustomerData.sln","OutputPath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/StrykerOutput/2021-10-13.14-30-34","ProjectUnderTest":null,"BaselineProvider":"Disk","Reporters":["Progress","Html"],"LogOptions":{"LogToFile":false,"OutputPath":"/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/StrykerOutput/2021-10-13.14-30-34","LogLevel":"Verbose"},"DevMode":false,"ProjectUnderTestNameFilter":null,"DiffEnabled":false,"CompareToDashboard":false,"GitDiffSource":"master","AdditionalTimeoutMS":5000,"ExcludedMutations":[],"IgnoredMethods":[],"ConcurrentTestRunners":4,"Thresholds":{"High":80,"Low":60,"Break":0},"TestRunner":"VsTest","FilePatterns":[{"Glob":{"Tokens":[{"TrailingPathSeparator":{"Value":"/"},"LeadingPathSeparator":null},{}]},"IsExclude":false,"TextSpans":[{"Start":0,"Length":2147483647}]}],"LanguageVersion":"Latest","Optimizations":"CoverageBasedTest, AbortTestOnKill","OptimizationMode":"perTest","TestProjects":[],"DashboardUrl":"https://dashboard.stryker-mutator.io","DashboardApiKey":null,"ProjectName":null,"ModuleName":null,"ProjectVersion":null,"MutationLevel":"Standard","DiffIgnoreFiles":[],"AzureSAS":null,"AzureFileStorageUrl":null,"FallbackVersion":"master"}
[14:30:35 INF] Identifying project to mutate.
[14:30:35 VRB] Scanned the directory /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests for *.csproj files: found ["/home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj"]
[14:30:35 VRB] Found project file /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj in path /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests
[14:30:35 DBG] Using /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj as test project
[14:30:35 DBG] Analyzing solution file /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/../../Brand.CustomerData.sln
[14:30:35 DBG] Analyzing project file /home/jenkins/agent/workspace/api_customer_data/app-bundle-api_customer_data/commit/src/api_customer_data/app-source-api_customer_data/test/Brand.CustomerData.GraphQLApi.Tests/Brand.CustomerData.GraphQLApi.Tests.csproj
[14:30:35 INF] Time Elapsed 00:00:00.3914235
Unhandled exception. System.ComponentModel.Win32Exception (2): No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Buildalyzer.Environment.ProcessRunner.Start()
   at Buildalyzer.Environment.DotnetPathResolver.GetInfo(String projectPath, String dotnetExePath)
   at Buildalyzer.Environment.DotnetPathResolver.ResolvePath(String projectPath, String dotnetExePath)
   at Buildalyzer.Environment.EnvironmentFactory.CreateCoreEnvironment(EnvironmentOptions options)
   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.ProjectFileReader.AnalyzeProject(String projectFilePath, String solutionFilePath)
   at Stryker.Core.Initialisation.InputFileResolver.ResolveInput(IStrykerOptions options)
   at Stryker.Core.Initialisation.InitialisationProcess.Initialize(IStrykerOptions options)
   at Stryker.Core.Initialisation.ProjectMutator.MutateProject(IStrykerOptions options, IReporter reporters)
   at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters)+MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Stryker.Core.StrykerRunner.RunMutationTest(StrykerOptions options, IEnumerable`1 initialLogMessages)
   at Stryker.CLI.StrykerCLI.RunStryker(StrykerOptions options) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 135
   at Stryker.CLI.StrykerCLI.<>c__DisplayClass7_0.<Run>b__0() in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 124
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass146_0.<OnExecute>b__0(CancellationToken _)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at Stryker.CLI.StrykerCLI.Run(String[] args) in /_/src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 127
   at Stryker.CLI.Program.Main(String[] args) in /_/src/Stryker.CLI/Stryker.CLI/Program.cs:line 16

Expected behavior The mutation test should happen properly

Desktop:

OS
NAME="Red Hat Enterprise Linux"
VERSION="8.3 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.3"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.3 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.3:GA"

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  1
Core(s) per socket:  1
Socket(s):           8
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz
Stepping:            0
CPU MHz:             2693.672
BogoMIPS:            5387.34
Hypervisor vendor:   VMware
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            39424K
NUMA node0 CPU(s):   0-7
  • Type of project: Core
  • Framework Version: 5.0.103
  • Stryker Version: 0.22.9

Additional context Also tried with version: 0.22.11

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AlbertoMonteirocommented, Oct 14, 2021

That does not seem like a standard way to install dotnet. It also looks like you’re extracting a runtime package of dotnet and not an sdk package. Does this container work for building your app?

Yeah, I pasted wrongly, we have 2 dockerfiles, one for build and other to run, I got the .tar from the other dockerfile hehe

I am in love with stryker, using it on my own machine for 2 months and now I am going to integrate on our CI pipeline.

Thanks for that awesome tool!!!

1reaction
AlbertoMonteirocommented, Oct 14, 2021

@rouke-broersma I fixed it installing the tool in the path /.dotnet/sdk/5.0.103/DotnetTools that does have more permission then the default folder when you install it globally.

Tyvm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

System.ComponentModel.Win32Exception (2): No such file ...
Why do I get this error when build for android aab? Exception: System.ComponentModel.Win32Exception (2): No such file or directory at...
Read more >
Getting System.ComponentModel.Win32Exception (2)
I'm getting this error when building from unity webgl. macos monterey 12.3 M1 ... Win32Exception (2): No such file or directory at System....
Read more >
Unhandled exception. System.ComponentModel. ...
Unhandled exception. System.ComponentModel.Win32Exception (2): No such file or directory on trying to set pwsh as default shell #12126.
Read more >
System.ComponentModel.Win32Exception (2): No such file ...
Unhandled exception. System.AggregateException: One or more errors occurred. ... Win32Exception (2): No such file or directory at System.
Read more >
Error with Unity SDK and WebGL - Technical Issue Reporting
Does anyone have any insights on this error below? System.ComponentModel.Win32Exception (2): No such file or directory at System.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found