Skip to content
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

I added .Net 5 support #46

Open
Micke3rd opened this issue Nov 27, 2020 · 7 comments
Open

I added .Net 5 support #46

Micke3rd opened this issue Nov 27, 2020 · 7 comments

Comments

@Micke3rd
Copy link

Micke3rd commented Nov 27, 2020

... because this project isnt maintained anymore, I made my changes at
https://github.com/Micke3rd/AForge.NET

I had to exclude a few things to compile it, and not all unit tests run successfully.
So feel free to update what you need.

@hansmbakker
Copy link

Well done! As a feedback I would recommend to multitarget to both net5.0 and netstandard2.0 where possible, so that UWP projects can still make use of it.

@hansmbakker
Copy link

Would it make sense for you to collaborate with @Andy9FromSpace in #42?

@Micke3rd
Copy link
Author

Micke3rd commented Jan 4, 2021

UWP is still using standard 2.0 ? Oh ok. Then if a user will raise the hand he needs it, I'll revert related commits.
If that doesnt lead to a compilable version, I'll use/merge Andy9FromSpace's branch, good point.

Animator posted in https://github.com/microsoft/ProjectReunion/issues/105 a description, how he use .Net5 with UWP. Maybe that already delivers what is neccessary.

@hansmbakker
Copy link

The solution in that topic does not result in apps you can publish, it is only a proof of concept, based on hacks, that works in debug mode (because then the normal compiler is used).

When you publish an app to the store it gets compiled using .Net Native which does not support .net 5.

If you allow for multitargeting to both netstandard2.0 and net5.0 then you can support all people.

By the way, what do you miss in netstandard2.0 which is in the pr I mentioned already?

@Micke3rd
Copy link
Author

Micke3rd commented Jan 4, 2021

"By the way, what do you miss in netstandard2.0 which is in the pr I mentioned already?"
You mean, why I updated targetframework to .Net5 ? Mainly to use the actual version.

@hansmbakker
Copy link

I understand, but when you have a Net5.0 project, you could still reference aforge.net if that targets netstandard2.0.

Functionally there is no difference, unless you want

  1. to modify the aforge.net code itself and use new language features that need c#9/.net5 inside the aforge.net library (e.g. if you want to add Span functions to the library)
  2. to have a shorter dependency chain (I don't have the details readily available)

In these two cases it helps to offer a .net 5 version of aforge.net. Especially for the second point, multitargeting is enough (adding both Net5.0 and netstandard2.0 as target frameworks). For the first part, I'm not sure whether multitargeting is possible.

@Micke3rd
Copy link
Author

Micke3rd commented Jan 5, 2021

Wait - the targetframework setting isnt anymore part of the projectfiles.
I described in the readme.md how you could define it centraly in the Directory.Build.props in your main project and inherit from there. In the example I showed how it would look like for .Net 5, but this snippet is not commited for the very reason not influence central settings.
The AForge.sln file is also primarly an example to show, that and how projects should be connected. In andrewkirillov's original are many isolated solutions, although their projects are logically dependant.
E.g. the unit tests had therefore no references to the actual code, only to the last compiled assemblies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants