New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update .net version from v4.8 to .NET 7 and create a new WinUI 3 interface #97
Comments
This isn't going to be a quick fix. At this stage I am contemplating creating a completely new codebase from scratch, and then migrating the existing code over bit by bit to the new codebase. In this way, I can add functionality in bitesized chunks, which should make it easier to handle. I am planning to move to .net6 and MAUI at this stage, with a move to .net7 once that is completed. The reason for .net6 target at first is to ensure that I get the widest range of libraries to use, which will hopefully minimise the impacts on the project and hhopefully avoid the need to find replacement libraries. |
Ok - researching this over the last few days, I now think it's best to move to .Net 7 directly, and then work on getting DisplayMagician having a PackageIdentity so that it can monitor the state of UWP apps. Once that is done then I can start working on a new MAUI interface to make it look much prettier. |
And further research means another pivot. Am now starting a completely new WinUI 3 .Net 7.0 application from scratch, and then I plan on slowly adding in functionality to that application until it reaches feature parity. The main reason for this is that the recommended structure of the WinUI 3 application is COMPLETELY different to a Windows.Forms application. The UI lifecycle is a bit different too, meaning that the existing code I have wouldn't really work in WinUI 3 land. So, rather than port the existing Windows.Forms code to .Net 7.0, I'm going to take the hit and rewrite the application again directly in WinUI3, moving across functionality bit by bit until the new code has feature parity. A WinUI 3 for Desktop app will allow all the background code like WinLibrary, NVIDIALibrary and AMDLibrary to work in exactly the same way, as well as all the game library interaction logic, as the P/Invoke code can still be used in this style of application. A MAUI UI didn't seem to allow that sort of functionality easily. Additionally, the WinUI 3 for Desktop App provides newer packaging options, allowing generation of MSIX files that can either be installed standalone or can be uploaded to the Microsoft Store for easy distribution. The use of MSIX provides a 'PackageIdentity' for DisplayMagician, and that allows me to request extra permissions like the ability to access diagnostic info objects. This will allow DisplayMagician to detect when UWP applications are started or stopped (which Windows currently denies with the MSI installation package). So, all in all DisplayMagician will be a much better place if I head down this path. WinUI functionality is being actively developed, and in the future additional functionality and features will be added to it, which DisplayMagician will be in a great position to take advantage of. The future is bright :D. |
Is your feature request related to a problem? Please describe.
The existing DisplayMagician UI uses Windows.Forms and uses the .NET Framework 4.8. The UI looks a bit ancient, and has a few bits that annoy me due to the limitations of Windows Forms in .NET Framework 4.8. Additionally, .NET Framework 4.8 is pretty old now, and although it currently doesn't have an end date for support, it makes sense to make use of the new .NET 7.
Describe the solution you'd like
.NET 7 consolidates the .NET Framework and .NET Standard together into a single version of .NET. This consolidation will help ensure that any libraries we use are more likely to be maintained because there is only one version of .NET to support. Additionally it provides a much wider range of more modern API functionality which should mean I have to do much less development support myself.
WinUI 3 is based on Xamarin.Forms, and provides an upgrade path from Windows.Forms. WinUI3 was chosen over MAUI due to the fact that we won't be supporting for display control in other operating systems in the future. It allows us to make use of the modern UI functionality provided by Windows itself, without having to find band-aids to work around problems caused by using old technology such as Windows.Forms. It also still lets us make use of Process Invocation and adds in some cool dependency injection and other cool things.
What the impact is
The amount of work this generates is extremely large. I'll need to:
It's quite a bit of work, which is why it will have to be a completely new version.
The text was updated successfully, but these errors were encountered: