This content has moved - please find it at https://devblog.cyotek.com.

Although these pages remain accessible, some content may not display correctly in future as the new blog evolves.

Visit https://devblog.cyotek.com.

Checking if your Windows Forms applications are ready for .NET Core 3.0

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.

The .NET Core 3.0 Desktop API Analyzer in action

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.

An example of a report showing the coverage of supported API's

Another part of the report, this time showing the unsupported API's

Update History

  • 2018-08-09 - First published
  • 2020-11-22 - Updated formatting

About The Author

Gravatar

The founder of Cyotek, Richard enjoys creating new blog content for the site. Much more though, he likes to develop programs, and can often found writing reams of code. A long term gamer, he has aspirations in one day creating an epic video game. Until that time, he is mostly content with adding new bugs to WebCopy and the other Cyotek products.

Leave a Comment

While we appreciate comments from our users, please follow our posting guidelines. Have you tried the Cyotek Forums for support from Cyotek and the community?

Styling with Markdown is supported

Comments

Gravatar

Victor racine

# Reply

Hello Richard

Thanks for ImageBox. I was wandering is ImageBox is compatible with .NET Core.

Best regards, Victor Racine

Gravatar

Richard Moss

# Reply

Hello,

Thanks for the comment. Right now, ImageBox isn't compatible as Core itself doesn't support Windows Forms. However, I believe it will be fully compatible with .NET Core 3.0 (and if it isn't I'll fix it as I would like to move some of my existing WinForms applications to Core).

Unfortunately my open source libraries have suffered from a severe lack of attention for some time and ImageBox also needs me to get off my behind and finish off some of the in-progress work I have on it which I should do before making .NET Core targets once 3.0 is generally available.

Regards;
Richard Moss