#Net5 – Migrating a fully functional Windows Form app to Net 5 in 10 minutes !

Buy Me A Coffee

Hi !

TbVolScroll is a super cool project, take a look 👇

Simple utility to enable volume control when your mouse cursor is positioned above the taskbar.
Hold the left ALT key to enable precise volume control (decrease/increase volume by 1%). Standard volume step is 5%. The volume bar will follow the cursor when it’s moved.
By default, if the volume is lower than 10% precise volume control is automatically enabled.

TbVolScroll

Note: As far as I remember, this feature is available in other OS.

And thanks to his author the code of the tool is available in GitHub (see references).

The original project is a .Net Framework 4.7.2 project, so I decided to test how much time it will take to migrate the project to .Net 5. I didn’t perform a deep analysis of the source project, before start. This is my labs migration path

  • Create a new Windows Form Net 5 project named [TbVolScrollNet5]
  • Copy all the files from the original project, avoiding the .csproj file
  • Rebuild !

And it worked ! I mean, I fixed some namespaces, added a missing NuGet package and 10 minutes later it was working. Of course, I submitted a pull request with the migration project, in the meantime I will keep this local just for fun.

And I want to use it ! So now is the time to pack and publish a local version of the tool. I created a local publish profile and defined

  • Build in Release | Any CPU
  • Deployment as Self-Contained
  • Runtime win-x86
  • Produce as single file
  • Enable ReadyToRun compilation
tbvolscroll publish profile as self contained

And that’s it! 150 MB to a fully functional working app 👇😸👇

tbvolscroll published version

Now back to work, and in my next steps I’ll publish this as a clickonce app so it’s easy to distribute. And the perfect excuse to learn more about .Net 5 !

References

¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.