You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running Stryker locally it is looking for the AssemblyInfo.cs file in the .net6.0 folder but the project has a target framework of .net8.0
[13:07:52 INF] Analysis starting.
[13:08:03 INF] Analysis complete.
[13:08:03 ERR] An error occurred during the mutation test run
System.IO.DirectoryNotFoundException: Could not find a part of the path C:\source...\obj\Release\net6.0\WorkerExtensions.AssemblyInfo.cs'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.File.ReadAllText(String path, Encoding encoding) at System.IO.Abstractions.FileWrapper.ReadAllText(String path) at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.FindProjectFilesUsingBuildalyzer(IAnalyzerResult analyzerResult, StrykerOptions options) in /_/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 92 at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.Build() in /_/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 39 at Stryker.Core.Initialisation.InputFileResolver.BuildSourceProjectInfo(StrykerOptions options, IAnalyzerResult analyzerResult, IEnumerable1 analyzerResults) in //src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 227
at Stryker.Core.Initialisation.InputFileResolver.ResolveSourceProjectInfos(StrykerOptions options) in //src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 68
at Stryker.Core.Initialisation.InitialisationProcess.GetMutableProjectsInfo(StrykerOptions options) in //src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs:line 58
at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner)+MoveNext() in //src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs:line 50
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) in /_/src/Stryker.Core/Stryker.Core/StrykerRunner.cs:line 63 [13:08:03 INF] Time Elapsed 00:00:10.8702594 Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path 'X:\source\Commerce\commerce-search-service\Commerce.Search\src\Commerce.Search.AzureFunctions\obj\Release\net6.0\WorkerExtensions.AssemblyInfo.cs'. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode) at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable1 unixCreateMode)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.ReadAllText(String path, Encoding encoding)
at System.IO.Abstractions.FileWrapper.ReadAllText(String path)
at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.FindProjectFilesUsingBuildalyzer(IAnalyzerResult analyzerResult, StrykerOptions options) in //src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 92
at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.Build() in //src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 39
at Stryker.Core.Initialisation.InputFileResolver.BuildSourceProjectInfo(StrykerOptions options, IAnalyzerResult analyzerResult, IEnumerable1 analyzerResults) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 227 at Stryker.Core.Initialisation.InputFileResolver.ResolveSourceProjectInfos(StrykerOptions options) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 68 at Stryker.Core.Initialisation.InitialisationProcess.GetMutableProjectsInfo(StrykerOptions options) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs:line 58 at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner)+MoveNext() in /_/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs:line 50 at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) in //src/Stryker.Core/Stryker.Core/StrykerRunner.cs:line 63
at Stryker.CLI.StrykerCli.RunStryker(IStrykerInputs inputs) in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 102
at Stryker.CLI.StrykerCli.<>c__DisplayClass11_0.b__0() in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 74
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.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 80
at Stryker.CLI.Program.Main(String[] args) in //src/Stryker.CLI/Stryker.CLI/Program.cs:line 14 Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
OS: Windows
Type of project .Net8.0
Stryker Version 4.0.1
Additional context
I found this stack overflow article with the same issue but it does not have a solution yet:
thanks for reporting this. Could you please share the project file (.csproj)?
Are you certain this file is not explicitly referred in the project (it happens sometimes)?
Are you certain there is no configuration that targets net6.0?
Describe the bug
When running Stryker locally it is looking for the AssemblyInfo.cs file in the .net6.0 folder but the project has a target framework of .net8.0
Logs
dotnet stryker -p PROJECT_NAME.csproj --target-framework 'net8.0'
_____ _ _ _ _ ______ _______
/ | | | | | \ | | | |
| ( | | _ __ _ | | _____ _ __ | | | | | |
_ | | '| | | | |/ / _ \ '| | . ` | | | |
) | || | | || | < / | | |\ | | | |
|_/ _|| _, ||____|| ()|| _|____| ||
/ |
|/
Version: 4.0.1
[13:07:52 INF] Analysis starting.
[13:08:03 INF] Analysis complete.
[13:08:03 ERR] An error occurred during the mutation test run
System.IO.DirectoryNotFoundException: Could not find a part of the path C:\source...\obj\Release\net6.0\WorkerExtensions.AssemblyInfo.cs'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode)at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode) at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize) at System.IO.File.ReadAllText(String path, Encoding encoding) at System.IO.Abstractions.FileWrapper.ReadAllText(String path) at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.FindProjectFilesUsingBuildalyzer(IAnalyzerResult analyzerResult, StrykerOptions options) in /_/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 92 at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.Build() in /_/src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 39 at Stryker.Core.Initialisation.InputFileResolver.BuildSourceProjectInfo(StrykerOptions options, IAnalyzerResult analyzerResult, IEnumerable
1 analyzerResults) in //src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 227at Stryker.Core.Initialisation.InputFileResolver.ResolveSourceProjectInfos(StrykerOptions options) in //src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 68
at Stryker.Core.Initialisation.InitialisationProcess.GetMutableProjectsInfo(StrykerOptions options) in //src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs:line 58
at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner)+MoveNext() in //src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs:line 50
at System.Collections.Generic.List
1..ctor(IEnumerable
1 collection)at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source) at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) in /_/src/Stryker.Core/Stryker.Core/StrykerRunner.cs:line 63 [13:08:03 INF] Time Elapsed 00:00:10.8702594 Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path 'X:\source\Commerce\commerce-search-service\Commerce.Search\src\Commerce.Search.AzureFunctions\obj\Release\net6.0\WorkerExtensions.AssemblyInfo.cs'. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode)at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode) at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable
1 unixCreateMode)at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.File.ReadAllText(String path, Encoding encoding)
at System.IO.Abstractions.FileWrapper.ReadAllText(String path)
at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.FindProjectFilesUsingBuildalyzer(IAnalyzerResult analyzerResult, StrykerOptions options) in //src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 92
at Stryker.Core.Initialisation.CsharpProjectComponentsBuilder.Build() in //src/Stryker.Core/Stryker.Core/Initialisation/CsharpProjectComponentsBuilder.cs:line 39
at Stryker.Core.Initialisation.InputFileResolver.BuildSourceProjectInfo(StrykerOptions options, IAnalyzerResult analyzerResult, IEnumerable
1 analyzerResults) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 227 at Stryker.Core.Initialisation.InputFileResolver.ResolveSourceProjectInfos(StrykerOptions options) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InputFileResolver.cs:line 68 at Stryker.Core.Initialisation.InitialisationProcess.GetMutableProjectsInfo(StrykerOptions options) in /_/src/Stryker.Core/Stryker.Core/Initialisation/InitialisationProcess.cs:line 58 at Stryker.Core.Initialisation.ProjectOrchestrator.MutateProjects(StrykerOptions options, IReporter reporters, ITestRunner runner)+MoveNext() in /_/src/Stryker.Core/Stryker.Core/Initialisation/ProjectOrchestrator.cs:line 50 at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)at Stryker.Core.StrykerRunner.RunMutationTest(IStrykerInputs inputs, ILoggerFactory loggerFactory, IProjectOrchestrator projectOrchestrator) in //src/Stryker.Core/Stryker.Core/StrykerRunner.cs:line 63
at Stryker.CLI.StrykerCli.RunStryker(IStrykerInputs inputs) in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 102
at Stryker.CLI.StrykerCli.<>c__DisplayClass11_0.b__0() in //src/Stryker.CLI/Stryker.CLI/StrykerCLI.cs:line 74
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.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 80
at Stryker.CLI.Program.Main(String[] args) in //src/Stryker.CLI/Stryker.CLI/Program.cs:line 14
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Additional context
I found this stack overflow article with the same issue but it does not have a solution yet:
https://stackoverflow.com/questions/78015604/stryker-cant-find-workerextensions-assemblyinfo-cs
The text was updated successfully, but these errors were encountered: