-
Notifications
You must be signed in to change notification settings - Fork 27
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
.NET Core support. #20
Comments
Short answer: No. One thing to consider is this isn't a .NET Library. This is a native C++ Library that can be consumed by the .NET Framework or UWP, but it's all written in C++. It compiles as C++/CLI to expose it to the .NET Framework, and C++/CX to expose it to UWP. To support .NET Core, it would have to be completely rewritten to expose a C-API that is then imported by .NET wrappers, which would be a significant amount of work, hard to maintain, and in the end it really wouldn't give you any new platforms, as there's still a native Windows library to call into. Sure we could technically compile a dynamic C-API library for Linux, but .NET Core doesn't really support mixing native code with .NET code cleanly, as the code paths would be different depending on the host-OS (you'd have to use a .NET Standard Nuget package with bait'n'switch and it quickly gets rather ugly). And that's if the resources where there to do a complete ground-up rewrite of this API. Also see #15 and #10 I'm curious why you require a .NET Core version of this API? Any reason you can't use .NET Framework? |
The main reason would be simple cross platform development. I also just really like the .NET Core tooling. Thanks for the detailed and prompt response. |
You could use https://github.com/OpenZWave/node-openzwave-shared together with https://github.com/aspnet/JavaScriptServices/tree/master/src/Microsoft.AspNetCore.NodeServices and create a wrapper around it that way. |
Reopening, as the WPF Team is building a C++ CLI compiler, so this might in fact become possible (not to mention .NET Framework is now essentially dead by November next year with .NET 5 shipping). |
Would be nice to have .Net core so we can run this on a Raspberry Pi |
@dotMorten is there anything I could do to help move this forward? I don't have a ton of experience with C++/C# interop but I'd be happy to learn. |
@tommymh thanks for the offer, but as explained above this would be a complete 100% rewrite and be a significant effort as you'd have to write both the native classes to export methods, and managed code to import them and properly manage life cycle etc. As such it would likely be better to do in an entirely new repo. |
A complete rewrite is something that I also don't have the time for at the moment, but certainly something I'd like to attempt in the future. I will reach out for guidance when time allows. |
if you take a look at https://github.com/roblans/ZWave4Net it seems they already have .net core support |
@cyberh0me Thanks for the link. That's definitely interesting, but from what I can tell, one thing to note is that that library isn't based around OpenZWave, but is a pure managed implementation. |
Is there any plan to add .NET Core support?
The text was updated successfully, but these errors were encountered: