-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Device.Gpio does not work on Mono #1089
Comments
Just got info from Mono people, the better way to workaround it is moving constructor to a new method marked as |
As a heads up per dotnet/runtime#35318, usage of WinRT types should move to the new C#/WinRT-based projections via the |
@jkoritzinsky do you have any example of any project transitioning, I'm not sure I'm following what's the work we should do 😄 |
The way to migrate is to remove all references to winmds and |
That sounds simple enough, thanks for the heads up, I'll let you know should we have any questions |
By the release of .NET 5 or 6, there should be a way to reference the package implicitly when targeting Windows to reduce the deployment size. If you find any issues, I suggest reporting them at https://github.com/microsoft/cswinrt. |
When using SPI and other protocols on Mono the Windows type is being loaded and fails to load because some fields use WinRT types which don't exist on Linux.
The workaround or quick fix is to replace
new WindowsSpiDevice(...)
withActivator.CreateInstance(Type.GetType(...), ...)
- I'm currently investigating if this is a Mono issue or if there is any better solution to fix this. It should also be fixed for other protocols not just SPI.The text was updated successfully, but these errors were encountered: