Skip to content
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

Setting up Continuous Integration, GitHub Actions and Automated Builds #29

Closed
gbakeman opened this issue Sep 30, 2022 · 0 comments · Fixed by #28
Closed

Setting up Continuous Integration, GitHub Actions and Automated Builds #29

gbakeman opened this issue Sep 30, 2022 · 0 comments · Fixed by #28
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@gbakeman
Copy link
Contributor

gbakeman commented Sep 30, 2022

I'd like to setup Continuous Integration builds to help automate compiling and distributing builds of WinNUT. This should simplify creating (pre)releases, but since I'm planning on retiring this iteration of WinNUT, this will mostly serve as my own learning tool for future projects.

Problems

WinNUT has evolved from a long line of legacy code and operating system support, and some aspects are not friendly to the default GitHub build environments.

Toasts

Initially, it became apparent that there is a fairly substantial hack to allow the solution to compile. WinNUT is built on the .NET Framework version 4.7.2, which is supported down to Windows 7 SP1. WinNUT supports sending Toast Notifications, which is a feature specific to Windows 10 and up. Due to the cross-platform design of the .NET Framework, this should not have been possible. (Related StackOverflow question) Several libraries were manually included (see here for example) which build based off of libraries available on Windows 10 operating systems, and not from any official software development kits. As a result, the GitHub automated build would fail with errors like ... WinNUT-Client_Common\ToastPopup.vb(39,30): error BC30002: Type 'Windows.UI.Notifications.ToastTemplateType' is not defined.

Solution

The solution has been provided by Microsoft, in the article titled Send a local toast notification from C# apps. A NuGet package is provided in the Microsoft Toolkit library, called Microsoft.Toolkit.Uwp.Notifications. We already target a supported Framework, so no work was necessary there. I removed the previous references and then added in the NuGet package. I was then able to easily modify our ToastNotification class to use the new package. (I also moved the class into the main WinNUT project since toasts seem specific to the UI.) After adding in NuGet package support to the build script, it appears that builds are no longer failing on this issue alone.

.vdproj MSI Packaging Project

Visual Studio Installer Project appears to be a legacy extension for building MSIs, and is not supported with msbuild (see this issue.) After researching this for quite some time, I don't see a straightforward solution to this besides redoing the packaging for WinNUT which will likely be a different issue. For now, we'll only build Debug builds.

Related: Pull #28

@gbakeman gbakeman added bug Something isn't working enhancement New feature or request labels Sep 30, 2022
@gbakeman gbakeman added this to the 2.2 Stable Release milestone Sep 30, 2022
@gbakeman gbakeman self-assigned this Sep 30, 2022
@gbakeman gbakeman linked a pull request Sep 30, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant