stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.77k stars 184 forks source link

Please can you consider supporting Mapperly ? #2684

Closed JL-Ikosoft closed 4 months ago

JL-Ikosoft commented 1 year ago

Is your feature request related to a problem? Please describe. I use Mapperly. It generates code in order to map objects based on partial class and methods:

Mapper(UseReferenceHandling = true)]
internal static partial class MappingExtension
{
    public static partial CustomerDto ToCustomer(this CustomerEntity item);
}

I've got lots of errors when Stryking my mapping code:

[09:36:55 WRN] Stryker.NET encountered a compile error in \MappingExtension.cs (at 77:35) with message: The partial method 'MappingExtension.ToCustomer(CustomerEntity)' must have an implementation part because it has accessibility modifiers.

[09:36:55 FTL] Stryker.NET could not compile the project after mutation. This is probably an error for Stryker.NET and not your project. Please report this issue on github with the previous error message. [09:36:55 INF] Time Elapsed 00:00:22.7925735 Unhandled exception.

Internal error due to compile error.

Describe the solution you'd like Use an attribute to explicitly disable Stryker at class level

Describe alternatives you've considered Tried to use configuration file to disable Stryker at class level

{
  "stryker-config": {
    "mutate": [ "!**/*MappingExtension.cs", "!**/*MappingExtension.g.cs" ]
  }
}

Does not work :/

Additional context No

Thanks :)

richardwerkman commented 1 year ago

Generated classes should be excluded from mutation by default. I'm not familiar with Mapperly so I don't know how the mapper class is generated. It could be that Stryker doesn't execute a msbuild step that is responsible for the code generation.

However I see in the docs of Mapperly it's possible to generated the code in a separate code file by adding:

<PropertyGroup>
  <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
  <CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>

<ItemGroup>
  <!-- Exclude the output of source generators from the compilation, show it in the IDE -->
  <Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
  <None Include="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
</ItemGroup>

This could be a workaround as Stryker will read the .cs files and compile them as well. This could fix your issue

dupdob commented 1 year ago

My understanding is that Mapperly is a roslyn code generator, as such it is theoretically supported out of the box by Stryker. My guess is that it fails to load at compilation time, hence no generated code. @JL-Ikosoft : could you check your log for a warning message such as Analyzer/Generator assembly Mapperly.dll(?) could not be loaded. Generated source code may be missing.?

it would confirm my analysis. That being said, not sure how to fix this then.

JL-Ikosoft commented 1 year ago

@richardwerkman , @dupdob, thanks for your support. @dupdob seems you've got the explaination.

[09:59:12 WRN] Analyzer/Generator assembly C:\Users\<XXXXXXX>\.nuget\packages\riok.mapperly\3.2.0\analyzers\roslyn4.7\dotnet\cs\Riok.Mapperly.dll could not be loaded.
Generated source code may be missing.
System.InvalidOperationException
   at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.<>c.<GetSourceGenerators>b__9_0(Object sender, AnalyzerLoadFailureEventArgs e) in /_/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs:line 71
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.AddExtensions(Builder builder, String language, Func`2 shouldInclude)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.CreateLanguageSpecificExtensions(String language, Extensions`1 extensions)
   at System.Collections.Immutable.ImmutableInterlocked.GetOrAdd[TKey,TValue,TArg](ImmutableDictionary`2& location, TKey key, Func`3 valueFactory, TArg factoryArgument)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.GetExtensions(String language)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.GetGenerators(String language)
   at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.GetSourceGenerators(IAnalyzerResult analyzerResult, ILogger logger) in /_/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs:line 72

However the dll is present in the specified directory. How to solve it?

Kind regards

JL-Ikosoft commented 1 year ago

@richardwerkman @dupdob i've created a sample solution reproducing my issue: https://github.com/JL-Ikosoft/Generated_Source_Code_may_Be_Missing

[10:42:32 INF] Analysis starting.
[10:42:32 INF] Identifying projects to mutate in C:\Users\julie\source\repos\Stryker\Generated_Source_Code_may_Be_Missing\Generated_Source_Code_may_Be_Missing.sln. This can take a while.
[10:42:34 INF] Found 1 source projects
[10:42:34 INF] Found 1 test projects
[10:42:34 INF] Found project C:\Users\julie\source\repos\Stryker\Generated_Source_Code_may_Be_Missing\Generated_Source_Code_may_Be_Missing\Generated_Source_Code_may_Be_Missing.csproj to mutate.
[10:42:34 INF] Analysis complete.
[10:42:34 INF] Building solution Generated_Source_Code_may_Be_Missing.sln
[10:42:39 INF] Number of tests found: 1 for project C:\Users\julie\source\repos\Stryker\Generated_Source_Code_may_Be_Missing\Generated_Source_Code_may_Be_Missing\Generated_Source_Code_may_Be_Missing.csproj. Initial test run started.
[10:42:40 WRN] Analyzer/Generator assembly C:\Users\julie\.nuget\packages\riok.mapperly\3.2.0\analyzers\roslyn4.7\dotnet\cs\Riok.Mapperly.dll could not be loaded.
Generated source code may be missing.
System.InvalidOperationException
   at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.<>c.<GetSourceGenerators>b__9_0(Object sender, AnalyzerLoadFailureEventArgs e) in /_/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs:line 71
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.AddExtensions(Builder builder, String language, Func`2 shouldInclude)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.CreateLanguageSpecificExtensions(String language, Extensions`1 extensions)
   at System.Collections.Immutable.ImmutableInterlocked.GetOrAdd[TKey,TValue,TArg](ImmutableDictionary`2& location, TKey key, Func`3 valueFactory, TArg factoryArgument)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.GetExtensions(String language)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.GetGenerators(String language)
   at Stryker.Core.Initialisation.Buildalyzer.IAnalyzerResultExtensions.GetSourceGenerators(IAnalyzerResult analyzerResult, ILogger logger) in /_/src/Stryker.Core/Stryker.Core/Initialisation/Buildalyzer/IAnalyzerResultExtensions.cs:line 72
[10:42:42 WRN] Stryker.NET encountered a compile error in C:\Users\julie\source\repos\Stryker\Generated_Source_Code_may_Be_Missing\Generated_Source_Code_may_Be_Missing\Program.cs (at 25:40) with message: La méthode partielle 'ExtMapper.ToPersonDto(PersonEntity)' doit avoir une partie implémentation, car elle a des modificateurs d'accessibilité. (Source code: public static partial PersonDto ToPersonDto(this PersonEntity obj);)
[10:42:42 WRN] Safe Mode! Stryker will try to continue by rolling back all mutations in method. This should not happen, please report this as an issue on github with the previous error message.
[10:42:42 FTL] Stryker.NET could not compile the project after mutation. This is probably an error for Stryker.NET and not your project. Please report this issue on github with the previous error message.
[10:42:42 INF] Time Elapsed 00:00:10.3158033
Unhandled exception.

Internal error due to compile error.
JL-Ikosoft commented 1 year ago

Generated classes should be excluded from mutation by default. I'm not familiar with Mapperly so I don't know how the mapper class is generated. It could be that Stryker doesn't execute a msbuild step that is responsible for the code generation.

However I see in the docs of Mapperly it's possible to generated the code in a separate code file by adding:

<PropertyGroup>
  <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
  <CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>

<ItemGroup>
  <!-- Exclude the output of source generators from the compilation, show it in the IDE -->
  <Compile Remove="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
  <None Include="$(CompilerGeneratedFilesOutputPath)/**/*.cs" />
</ItemGroup>

This could be a workaround as Stryker will read the .cs files and compile them as well. This could fix your issue

@richardwerkman I gave a try but doesn't work. Same error occurs :/

JL-Ikosoft commented 1 year ago

@richardwerkman @dupdob build produces a dll that has the implementation of the mapping inside It creates a private method for that: private static PersonDto MapToPersonDto image

dupdob commented 1 year ago

hi @JL-Ikosoft : I have an update, both good and bad. This project works flawlessly on my machine. Which points to something somehow specific to your setup.

Could you please try using 'fuslogvw' to try why the extension fails to load ? See https://learn.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer for how to use it. You should use log bind failures to disk , run stryker (on your project) , hit refresh (on fuslogvw) and find the line for Riok.Mapperly.dll and report the error.

You should disable error logging afterward as it impairs performance. Note taht fuslogvw must be run with adminstrator privileges

JL-Ikosoft commented 1 year ago

Hello @dupdob, thank you for your support.

According to fuslogvw it seems there's a binding failure (sorry for the french version)

image

It looks everywhere but cannot fing the Riok.Mapperly.dll nor Riok.Mapperly.Abstractions.dll

image

Quite weird because dlls are available in my personnal nuget folder

image

I deleted the nuget packages directory and restored it but although package is correctly referenced into the project, i still got this error: .nuget\packages\riok.mapperly\3.2.0\analyzers\roslyn4.7\dotnet\cs\Riok.Mapperly.dll could not be loaded

Eventually, i can set the attribute ExcludeAssets to runtime of the package reference. Thus Striker doesn't see the generated code.

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net7.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Riok.Mapperly" ExcludeAssets="runtime" Version="3.2.0" />
    </ItemGroup>

</Project>
dupdob commented 1 year ago

Quick question: does the timing match with a Stryker run ? I am asking because the application is listed as devenv (ie VStudio), this is surprising. Could you please clear the log and rerun Stryker, just to be sure of the actual error source ?

JL-Ikosoft commented 1 year ago

Overall yes within minutes

What I did:

:/

still this error

[17:48:05 WRN] Analyzer/Generator assembly C:\Users\julien.lefevre\.nuget\packages\riok.mapperly\3.2.0\analyzers\roslyn4.7\dotnet\cs\Riok.Mapperly.dll could not be loaded.

And

[17:48:07 WRN] Stryker.NET encountered a compile error in C:\Users\julien.lefevre\source\Generated_Source_Code_may_Be_Missing\Generated_Source_Code_may_Be_Missing\Program.cs (at 25:40) with message: La méthode partielle 'ExtMapper.ToPersonDto(PersonEntity)' doit avoir une partie implémentation, car elle a des modificateurs d'accessibilité. (Source code: public static partial PersonDto ToPersonDto(this PersonEntity obj);)
dupdob commented 1 year ago

you should have an error in fuslogvw for this one. What is the associate log. Just to be clear: I am not trying to find a workaround for this issue, just trying to understand why it fails fro you while it works for me. Note that the log does show that there is an attempt to load the dll from the correct folder. The load fails for some reason (it may be logged just after the warn, by the way). My guess is that there is some dependency version conflict that fuslogvw should help to identify

JL-Ikosoft commented 1 year ago

Hello @dupdob

Ok, i slowly understand how this fuslogvw works. It logs as programs are running. Once i've launched visual studio it logged 2 Mapperly related files in a "C:\Temp\fuslogvw\Default\VBCSCompiler.exe" folder.

Here is the content of the Riok.Mapperly, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null.HTM file. Sorry for the french.

<meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre>
*** Entrée du journal Binder d'assembly  (04/10/2023 @ 09:08:05) ***

L'opération a échoué.
Résultat de liaison : hr = 0x80070002. Le fichier spécifié est introuvable.

Gestionnaire des assemblys chargé à partir de :  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Exécution sous l'exécutable  C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe
--- Un journal des erreurs détaillé suit. 

=== Informations d'état de liaison préalable ===
JRN : DisplayName = Riok.Mapperly, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL
 (Fully-specified)
JRN : Appbase = file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/
JRN : PrivatePath initial = NULL
JRN : base dynamique = NULL
JRN : base de cache = NULL
JRN : AppName = VBCSCompiler.exe
Assembly appelant : Microsoft.CodeAnalysis, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
JRN : cette liaison démarre dans le contexte de chargement de default.
JRN : utilisation du fichier de configuration de l'application : C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe.Config
JRN : utilisation du fichier de configuration d'hôte : 
JRN : utilisation du fichier de configuration de l'ordinateur à partir de C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
JRN : stratégie non appliquée à la référence à ce stade (liaison d'assembly privée, personnalisée, partielle ou basée sur l'emplacement).
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly/Riok.Mapperly.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.EXE.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly/Riok.Mapperly.EXE.
JRN : toutes les URL recherchées ont été tentées et ont échoué.

</pre></html><meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre>
*** Entrée du journal Binder d'assembly  (04/10/2023 @ 09:08:05) ***

L'opération a échoué.
Résultat de liaison : hr = 0x80070002. Le fichier spécifié est introuvable.

Gestionnaire des assemblys chargé à partir de :  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Exécution sous l'exécutable  C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe
--- Un journal des erreurs détaillé suit. 

=== Informations d'état de liaison préalable ===
JRN : DisplayName = Riok.Mapperly, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL
 (Fully-specified)
JRN : Appbase = file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/
JRN : PrivatePath initial = NULL
JRN : base dynamique = NULL
JRN : base de cache = NULL
JRN : AppName = VBCSCompiler.exe
Assembly appelant : Microsoft.CodeAnalysis, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
JRN : cette liaison démarre dans le contexte de chargement de default.
JRN : utilisation du fichier de configuration de l'application : C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe.Config
JRN : utilisation du fichier de configuration d'hôte : 
JRN : utilisation du fichier de configuration de l'ordinateur à partir de C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
JRN : stratégie non appliquée à la référence à ce stade (liaison d'assembly privée, personnalisée, partielle ou basée sur l'emplacement).
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly/Riok.Mapperly.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.EXE.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly/Riok.Mapperly.EXE.
JRN : toutes les URL recherchées ont été tentées et ont échoué.

</pre></html>

Here is the content of the Riok.Mapperly.Abstractions, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null.HTM file

<meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre>
*** Entrée du journal Binder d'assembly  (04/10/2023 @ 09:08:05) ***

L'opération a échoué.
Résultat de liaison : hr = 0x80070002. Le fichier spécifié est introuvable.

Gestionnaire des assemblys chargé à partir de :  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Exécution sous l'exécutable  C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe
--- Un journal des erreurs détaillé suit. 

=== Informations d'état de liaison préalable ===
JRN : DisplayName = Riok.Mapperly.Abstractions, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL
 (Fully-specified)
JRN : Appbase = file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/
JRN : PrivatePath initial = NULL
JRN : base dynamique = NULL
JRN : base de cache = NULL
JRN : AppName = VBCSCompiler.exe
Assembly appelant : Microsoft.CodeAnalysis, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
JRN : cette liaison démarre dans le contexte de chargement de default.
JRN : utilisation du fichier de configuration de l'application : C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe.Config
JRN : utilisation du fichier de configuration d'hôte : 
JRN : utilisation du fichier de configuration de l'ordinateur à partir de C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
JRN : stratégie non appliquée à la référence à ce stade (liaison d'assembly privée, personnalisée, partielle ou basée sur l'emplacement).
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions/Riok.Mapperly.Abstractions.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions.EXE.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions/Riok.Mapperly.Abstractions.EXE.
JRN : toutes les URL recherchées ont été tentées et ont échoué.

</pre></html><meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre>
*** Entrée du journal Binder d'assembly  (04/10/2023 @ 09:08:05) ***

L'opération a échoué.
Résultat de liaison : hr = 0x80070002. Le fichier spécifié est introuvable.

Gestionnaire des assemblys chargé à partir de :  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Exécution sous l'exécutable  C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe
--- Un journal des erreurs détaillé suit. 

=== Informations d'état de liaison préalable ===
JRN : DisplayName = Riok.Mapperly.Abstractions, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL
 (Fully-specified)
JRN : Appbase = file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/
JRN : PrivatePath initial = NULL
JRN : base dynamique = NULL
JRN : base de cache = NULL
JRN : AppName = VBCSCompiler.exe
Assembly appelant : Microsoft.CodeAnalysis, Version=4.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
JRN : cette liaison démarre dans le contexte de chargement de default.
JRN : utilisation du fichier de configuration de l'application : C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\Roslyn\VBCSCompiler.exe.Config
JRN : utilisation du fichier de configuration d'hôte : 
JRN : utilisation du fichier de configuration de l'ordinateur à partir de C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
JRN : stratégie non appliquée à la référence à ce stade (liaison d'assembly privée, personnalisée, partielle ou basée sur l'emplacement).
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions/Riok.Mapperly.Abstractions.DLL.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions.EXE.
JRN : tentative de téléchargement de la nouvelle URL file:///C:/Program Files/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/Roslyn/Riok.Mapperly.Abstractions/Riok.Mapperly.Abstractions.EXE.
JRN : toutes les URL recherchées ont été tentées et ont échoué.

</pre></html>

Would you need any information please ask.

Thanks for your help :)

JL-Ikosoft commented 1 year ago

@dupdob

If i delete all fuslogvw log, then run stryker from a Developper PS for VS 2022 preview console and then look for fuslogvw log then if find nothing about Riok.Mapperly.

Please find below Stryker log. Maybe it will help

logs.zip

dupdob commented 1 year ago

I am quite surprise of the lack of fuslogvw entry, ~but I found a possible weakness in the code~. update: in fact, not really. I jumped to conclusion too fast.

Support/handling analyzers is simply NOT documented (at all) by MS, so it is a trial and error process for us. Digging into Roslyn source code, I understand the cause for failure are numerous and not limited to failing to load the assembly.

The best I can do at this stage is improve logging to have a better view of why this fails.

Quick question: would you be able and willing to build and use an ad hoc version of Stryker ? I could provide you with a version with improved logging and see what we can get from it. Alternatively, the improved logging will be part of the next release and you can try again when it is officially released

rouke-broersma commented 4 months ago

@JL-Ikosoft if you run into this issue again please let us know and answer the questions @dupdob asked. For now I'll close the issue as not reproducible and potentially related to your specific environment.