stryker-net icon indicating copy to clipboard operation
stryker-net copied to clipboard

Unhandled exception when running against a .NET MAUI project

Open aspeckt-112 opened this issue 2 years ago • 5 comments

I apologise if there are any outstanding issues/discussions surrounding this that I've missed. I did look.

Describe the bug I get an unhandled exception when trying run Stryker against a .NET MAUI project. Stryker has previously worked when the same project was targeting Xamarin.Forms.

Logs I've attached a .zip containing the log files.

Expected behavior Stryker should work the same as it previously did with Xamarin Forms.

Desktop (please complete the following information):

  • OS: macOS. M1 Pro chip
  • Type of project .NET MAUI
  • Framework Version .NET 6.0
  • Stryker Version 3.0.1

Additional context I'm happy to provide a sample project, should the logs not be sufficient. logs.zip

aspeckt-112 avatar Oct 11 '22 15:10 aspeckt-112

Hi,

Xamarin and MAUI use some msbuild magic to generate certain files during build. For xamarin we have added some specific support so we get those files. Could be this is done in a different way or looks different for MAUI. Due to that it looks like there are some classes missing from the compilation. Support for MAUI will have to be added.

rouke-broersma avatar Oct 11 '22 18:10 rouke-broersma

That's totally fair enough. Makes complete sense.

I don't have a huge amount of free time right now, but do you have anything you can point me towards as a "getting started" point? I'd be quite happy to have a go at a PR to add support. I love Stryker, I'd like to keep it part of my workflow, and I'm happy to spend some time trying to make that happen.

aspeckt-112 avatar Oct 11 '22 19:10 aspeckt-112

I will start working on it! 👀

OssamaSijbesma avatar Oct 28 '22 08:10 OssamaSijbesma

@OssamaSijbesma could you note your findings here? And do you still intend to create a PR with the partial fix?

rouke-broersma avatar Oct 29 '22 08:10 rouke-broersma

I worked around this by moving the core of my code to a separate library project.
I'm not 100% but with the digging I did it looked to be an issue with Buildalyzer nuget not being able to handle MAUI.

kevmoens avatar Jan 06 '23 15:01 kevmoens