Target .Net Standard in Lieu of .Net Framework #1263
-
Is there a reason why the core libraries of BHoM could not target .Net Standard in lieu of .Net Framework to support operating systems other than Windows? One would also expect that in the next few years commercial software providers may begin to move away from targeting .Net Framework for their APIs and SDKs as well so this would allow compatibility with both versions of 'full' .Net. Given that .Net Framework 4.5.2 will go out of support in April 2022 (due to insecurities in the SHA-1 algorithm) it may be prudent to upgrade all assemblies requiring .Net Framework to version 4.7.2 which would allow use of .Net Standard 2.0 for the core libraries (per MS recommendations). Keen to hear any thoughts. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 15 replies
-
Hi @RichardWhitfieldTTW we're currently investigating a potential move to .Net Core. We did previously look at a move to .Net Standard but the cons outweighed the pros at that time, but that was a discussion held last year, and things have moved on since then! It's on my roadmap to investigate what a move to .Net Core would do for the UIs and general deployment of the BHoM in known uses, any information you have that would support that would be great to hear 😄 |
Beta Was this translation helpful? Give feedback.
-
Hi @FraserGreenroyd I have been through and updated all of the assemblies in the BHoM repo to target netstandard2.0 and updated the .csproj files to be the newer SDK format. On this GitHub account (I have now left TTW) I don't have permission to push this branch to origin, are you able to give me access for this? You can also remove the old TTW account if you like. Once it's up then I can create a PR if that's your preferred way to review the code...I think that it's likely that you will want some further changes (see below). Also before merging this then all the other projects in the BHoM will need upgrading to Net Framework 4.7.2 to make use of this version of netstandard. I am happy to do this (can look at this immediately), I will also do the same and change the .csproj to be the newer SDK format as I go (it's much cleaner). As I have been going through and making the changes I have a few queries:
Rich |
Beta Was this translation helpful? Give feedback.
-
Ok so a bit slower than originally hoped but here we go. For guidance, the 4.3 milestone ends on the 24th September 2021, with the 5.0 milestone starting on the 27th September 2021, so end of 4.3 can also be read as end of September. The key bit here is outlined in the first slide, that .Net Standard is unlikely to have enough LTS for me to be happy, but .Net 5 goes out of support 3 months after .Net 6 is released, which is currently projected for November 2021. Thus, I think it makes sense to do the investigatory work with the toolkits on .Net 5 between now and November (on the basis that there are unlikely to be massive changes between .Net 5 and 6 that would impact our investigations from looking at the specs.) and then upgrade straight to .Net 6 in November. Thoughts? Also tagging in @IsakNaslundBh @pawelbaran @peterjamesnugent as named individuals on the slides to be aware of. |
Beta Was this translation helpful? Give feedback.
-
Ok so we've updated BHoM, BHoM_Engine, and BHoM_Adapter to now run on .Net Standard 2.0, and all toolkits included within the installer to run on .Net Framework 4.7.2. Following this, compliance guidelines are updated (or will be very shortly) to say that .Net Framework 4.7.2 is the bare minimum framework a toolkit should be running on, with ideally toolkits running on .Net Standard 2.0 or higher if they can. I would say the All of the updates will be released in the 5.0 beta in December, so plenty of time to do tests and update further if needed, but I'll mark this as the 'answer' to this discussion and get ready for the next bits 😄 |
Beta Was this translation helpful? Give feedback.
Ok so we've updated BHoM, BHoM_Engine, and BHoM_Adapter to now run on .Net Standard 2.0, and all toolkits included within the installer to run on .Net Framework 4.7.2.
Following this, compliance guidelines are updated (or will be very shortly) to say that .Net Framework 4.7.2 is the bare minimum framework a toolkit should be running on, with ideally toolkits running on .Net Standard 2.0 or higher if they can.
I would say the
record
discussion should be it's own topic @RichardWhitfield if that's ok, just so we can close out this line of enquiry 😄All of the updates will be released in the 5.0 beta in December, so plenty of time to do tests and update further if needed, but I'll mark this a…