The WinForms Notepad Project (2022): Reviving a Classic (Premium)

For my January 2022 programming project, I’m reviving the Windows Forms (WinForms) version of .NETpad so I can make it available publicly on GitHub. And then I’ll look into modernizing it as I wrote previously in .NETpad Resurrections (Premium).

As it turns out, this required more work than I had expected.

For reference, I pushed all four of my .NETpad versions---Visual Basic/WinForms/.NET Framework 4.x, C#/WinForms/.NET Framework 4.x, C#/Windows Presentation Foundation (WPF)/.NET Core 3.1, and C#/Universal Windows Platform (UWP)---to my GitHub account about a year and a half ago, intending to make them public. And then I didn’t, for no reason I can think of. I got lost in researching other programming projects, time went by, and here we are.

Flash forward to today, and things have changed more than a bit since I first started these projects. Microsoft .NET has advanced from .NET Core 3.1 to .NET 5 and then .NET 6. Incredibly, Microsoft has started updating WinForms again, despite it being a 20+-year-old technology. And Visual Studio has progressed from version 2019 to 2022.

Anyway. In reviving these projects, starting of course with the only one I didn’t document on Thurrott.com, the C#/WinForms/.NET Framework 4.x version, I discovered that each needed to be cleaned up and fixed in some way. So I obviously needed to do that work before I could make them available, in turn, to you.

I’m not a professional programmer or a Visual Studio expert, so I eventually needed help with some of the issues I was experiencing. And so I naturally turned to Rafael Rivera---who is a professional programmer and a Visual Studio expert--for the answers. As always, he’s been a godsend, and he got me over some humps that otherwise would have caused me to simply start over from scratch. I was literally going down that path when he saved the day.

I also originally wrote a rather tedious 2500-word article (over) detailing the problems I encountered while updating and fixing the C#/WinForms/.NET Framework 4.x version of .NETpad. But since you won’t need to make these changes yourself, I sat on it for several days and then ultimately decided not to bore you with it. Instead, I will quickly explain each issue and fix, in turn, here.

To get started, I installed Visual Studio 2022 Community and configured it with the workloads I will need for all of my .NETpad projects: .NET desktop development and Universal Windows Platform Development, plus Desktop development with C++ because I can’t help myself and you never know. Then, I cloned---basically, made a local copy of---the C#/WinForms/.NET Framework 4.x version of .NETpad onto my laptop in Visual Studio to see where it was at.

And then I tried to build and run it, of course. How naïve of me.

Given that .NETpad worked perfectly when I last did this, I was surprised to see that there build errors, and that at least one of these errors meant that I couldn’t even run the appl...

Gain unlimited access to Premium articles.

With technology shaping our everyday lives, how could we not dig deeper?

Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.

Tagged with

Share post

Please check our Community Guidelines before commenting

Windows Intelligence In Your Inbox

Sign up for our new free newsletter to get three time-saving tips each Friday

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Thurrott © 2024 Thurrott LLC