Redth / ZXing.Net.Maui

Barcode Scanning for MAUI?
MIT License
437 stars 146 forks source link

xUnit support with .Net 7 #112

Open danlfarnell opened 1 year ago

danlfarnell commented 1 year ago

Hi,

I'm currently tring to Add a xUnit test project to my .Net Maui solution. I have followed the steps detailed in the following video link.

https://www.youtube.com/watch?v=C9vIDLQwc7M

In order to make xUnit work in .Net Maui we basically have to change the target frameworks in the .Net Maui csproj and add net7.0 to the list of target frameworks. However, when I do this and try to build, I get the following errors for the ZXing.Net.Maui and ZXing.Net.Maui.Controls packages. Could you make those packages support net7.0? Thanks in advance and keep up the great work!!

Package ZXing.Net.Maui 0.3.0-preview.1 is not compatible with net7.0 (.NETCoreApp,Version=v7.0). Package ZXing.Net.Maui 0.3.0-preview.1 supports:
  - net7.0-android33.0 (.NETCoreApp,Version=v7.0)
  - net7.0-ios16.0 (.NETCoreApp,Version=v7.0)
  - net7.0-maccatalyst15.4 (.NETCoreApp,Version=v7.0)
  - net7.0-windows10.0.19041 (.NETCoreApp,Version=v7.0)
Package ZXing.Net.Maui.Controls 0.3.0-preview.1 is not compatible with net7.0 (.NETCoreApp,Version=v7.0). Package ZXing.Net.Maui.Controls 0.3.0-preview.1 supports:
  - net7.0-android33.0 (.NETCoreApp,Version=v7.0)
  - net7.0-ios16.0 (.NETCoreApp,Version=v7.0)
  - net7.0-maccatalyst15.4 (.NETCoreApp,Version=v7.0)
  - net7.0-windows10.0.19041 (.NETCoreApp,Version=v7.0)
thomaskaelin commented 1 year ago

@danlfarnell There is an open pull request #105 that would fix this issue.