-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Intention] Change platforms to .NET Core #159
Comments
I decided to run the .NET API Portability Analyzer over this repo. I used the Debug for release v18.7.0.17. The command line I used was:
The output html file is attached. I haven't had much of a look at the output, but as is mentioned in #158, |
Thanks for running this. It was quite useful to read. |
I decided to give ~3 hours to seeing how far I could get with migrating AudioAnalysis to .NET Core. Summary: the migration is definitely possible, however there are some dependencies that need updates before it is feasible to attempt. I did not manage to get it to build, but using the CoreCompat approach outlined below, I think it should be possible to make it build without many changes and without too much more work. .Net Core seems to have much better support for System.Drawing, in System.Drawing.Common (src), which has replaced CoreCompat.System.Drawing and friends. Accord.Net is the key dependency that is not ready - it is in the process of migrating, there is a commit in the development branch, but has not yet been released. The migration of AudioAnalysis could proceed without this change by using the current Accord.Net with CoreCompat, which in turn requires overcoming the type collisions for the types in System.Drawing. The approach I took to do the actual migration was to create a new Solution in VS2017, and create each project as a .NET Core 2.0 Library (Console for AnalysisPrograms). I then copied the *.cs and *.fs files into the new projects. I added the same NuGet packages and added the same references to other projects. A sample of the changes I made:
I don't know if I'll give it any more time, but if I do I'll update my progress here. There is no branch or PR related to this, yet. |
Other dependencies that need to be changed for .NET Core. Unfortunately none of these have an obvious migration path.
|
Awesome work. Even though System.Drawing appears to exist in .Net Core compatible builds I'm still keen to replace it. AFAIK the limitations in GDI+ still exist. I think your approach was useful. We should probably ramp up support for this migration slowly and maintain concurrent solutions. When both solutions compile, pass tests successfully, and are otherwise black box compatible, we can switch over. I see that Accord has incorporated Aforge in its entirety so that problem should be a non-issue. I've updated the original issue with a list of TODOs. More than likely, as you suggested, most of these dependencies can be removed, replaced, or we can submit a PR. |
F# projects not done - they'll need to be done manually later Work done for #159
Known bugs: - short file name bug (se main entry) - #289 - #288 - ImageSharp has bugs that crash with versions greater than 1.0.0-unstable0598 - ImageSharp has bug in parallel implementation so you'll find Drawing.NoParallelConfiguration sprinkled everywhere - And another ImageSharp bug prevents us from writing text on concatenated images All up though, the majority of things work. Yay! Work done for #158 and #159
F# projects not done - they'll need to be done manually later Work done for #159
Known bugs: - short file name bug (se main entry) - #289 - #288 - ImageSharp has bugs that crash with versions greater than 1.0.0-unstable0598 - ImageSharp has bug in parallel implementation so you'll find Drawing.NoParallelConfiguration sprinkled everywhere - And another ImageSharp bug prevents us from writing text on concatenated images All up though, the majority of things work. Yay! Work done for #158 and #159
Closed (completed) |
Expected behaviour
Our application should run on .NET Core - a newer, improved, .NET platform that has full cross-platform support, is faster, and has fewer quirks than Mono.
Actual behaviour
We can only run our app on Mono, which is slower and has less platform support.
Any other details
This change should be easy enough for our code. The problem is replacing dependencies that do not support .NET core.
UPDATE:
Another goal: I'd greatly prefer to still produce a self-contained executable for Windows machines. Currently, Windows machines all ship with a .NET framework installed which makes running our solution as simple as running the shipped exe. As I understand it, by default .NET Core does not produce executables anymore and requires a
dotnet my.dll
invocation to run any program.Notes from @cofiem:
The text was updated successfully, but these errors were encountered: