Since the recent announcement that .NE Core 3.0 would support Windows Forms, I've been cautiously optimistic. Over the last week or so I've finally started experimenting with ASP.NET Core 2.1 and liking what I see (mostly, I haven't made my mind up with Razor Pages yet!).
A couple of days ago Microsoft made another announcement - a tool to scan your existing Windows Forms / WPF applications and see if how much of the API's they use are supported by Core 3.0.
I just gave that tool a run through of several of our
applications and I'm really surprised to see that apparently the
majority of them should "just work" - most of the non-compatible
problems are to do with the System.Windows.Forms.Design
namespace. Given this is mostly for design-time control support
I think it will be fine, although in some layout code I do use
the designers at runtime to align controls via their text
baselines; that at least will probably need rethinking. Also
for some reason I noticed that getting ACLs for a directory
isn't supported, again something that isn't critical and that I
can workaround. Gif Animator makes use of a custom app domains
which could be slightly more complicated to resolve but as with
most of the issues I saw, not insurmountable.
Regretfully the "Recommended changes" column wasn't populated
for most of the issues I saw, bar the System.AppDomain
detection which rather tersely states to "Remove usage.".
All in all, it's looking quite promising and I'm quite looking forward to getting my hands on Core 3.0 in the future, although I have re-writing cyotek.com in ASP.NET Core to keep me busy in the interim!
If you have existing Windows Forms or WPF applications that you are considering switching to run under .NET Core, then it might well be worth checking out Microsoft's announcement post and running the .NET Core 3.0 Desktop API Analyzer on your own code.
Update History
- 2018-08-09 - First published
- 2020-11-22 - Updated formatting
Like what you're reading? Perhaps you like to buy us a coffee?
# Victor racine
# Richard Moss