-
Notifications
You must be signed in to change notification settings - Fork 1.4k
.NET 5 support for Notifications package #3622
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
Conversation
Thanks andrewleader for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Tested CI built package with .NET 5 WPF and .NET 5 ASP! Worked! Gonna test with the rest of my test suite to make sure classic projects are still working. Hmm... this broke UWP's min version again, increasing it to 17763 even though it had my changes from #3582... investigating @michael-hawker any concerns with upgrading the MSBuild.Sdk.Extras global package to |
…ows-toolkit/WindowsCommunityToolkit into aleader/notifications-net-5
@andrewleader I believe @Sergio0694 updated the |
@michael-hawker Yeah I did so in #3573, which at the moment only needs another review to be ready to merge 😋 |
Ah perfect :) Should I keep my change for updating Extras in my PR? Pretty sure it'd be merged without a conflict right? Or should I revert that specific change? |
Keep it here as well, its fine and should be merged without a conflict if the change is exactly the same. |
@@ -3,7 +3,7 @@ | |||
<PropertyGroup> | |||
<!--<TargetFrameworks>netstandard1.4;uap10.0;native;net461;netcoreapp3.1</TargetFrameworks>--> | |||
<!-- Removed 'native' target to unblock CI on VS 16.8, tied to changes breaking workaround for https://github.com/NuGet/Home/issues/5154 --> | |||
<TargetFrameworks>netstandard1.4;uap10.0;net461;netcoreapp3.1</TargetFrameworks> | |||
<TargetFrameworks>netstandard1.4;uap10.0.19041;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clairernovotny when we specify uap10.0.19041
here will to be enforced for the "Target" or the "Min" required version of the app?
In our other packages we assume it's the min and have 17763
, so I would assume we want to follow that pattern here as well?
@andrewleader was there some guidance or doc you reference in setting this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uap10.0.19041
is the target, not the min. Min version is specified in the <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
, I've tested and confirmed it installs on old UWPs. I don't think the MSBuild.Sdk.Extras has documented all of this, but it works 🤷♂️
That's how the net5.0-windows TF works too, what's specified is the target... however, there's a weird case where if the app is targeting 17763
and the library is targeting 19041
but ALSO has a plain net5.0
target, it'll pick net5.0
instead... hence why I've kept net5.0-windows
at 17763 (I confirmed you do not need the 17763 SDK installed to build it though so ppl only need 19041 SDK).
@andrewleader converting this to a draft until you've got the new updates in for the nuspec. Let us know when it's ready for review again, thanks! |
* Making package works but throws at runtime * I think it all works! * Remove comment and update description
Got almost everything working...
Not sure why C# UWP with low min version is unhappy, throws the following exception at runtime
Version |
Just using winmd version
Seems like the UWP min version problem was related to updating the MsBuild.Sdk.Extras? Idk, the min version of the SDK was still set to 10240 but it seems like it was still building as if it's for a .NET Standard 2 app or something... I fiddled around a long time but to work around the issue and still support UWP apps with low min versions, I simply decided to use the WINMD version of the library for that version. So now both UWP C++ apps and UWP C# apps with min version 10240-15063 use the WINMD version. Switching to that only introduces a very minor breaking change, mostly scoped to progress bar, details added to the PR for the breaking changes. |
@michael-hawker @azchohfi this is ready for review! |
Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.nuspec
Outdated
Show resolved
Hide resolved
@andrewleader looks like you have some StyleCop issues like these preventing build:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with a standalone .NET5 WPF application. No issue found, all working great
Fixes #3579 and Fixes #3565
.NET 5 project support for the Notifications package. Had to add targets for both
net5.0-windows10.0.17763
(for WPF/console Windows apps) andnet5.0
(for ASP.NET, class libraries). The plainnet5.0
version does NOT include the Show() APIs since those are for client apps.Also fixes activation for elevated processes (previously if the app was elevated and toast is clicked, it would launch a new, non-elevated process).
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Cannot install Notifications package onto .NET 5 WPF apps or .NET 5 ASP.NET apps
What is the new behavior?
Installing into .NET 5.0 WPF and ASP.NET apps works and all features are functional!
PR Checklist
Please check if your PR fulfills the following requirements:
Other information
Breaking changes
AdaptiveProgressBar.Value
propery has changed fromBindableProgressBarValue
toAdaptiveProgressBarValue
. UseAdaptiveProgressBarValue.FromDouble(0.3)
orAdaptiveProgressBarValue.FromBinding("progress")
.AdaptiveProgressBar
Title
,ValueStringOverride
, andStatus
properties have changed fromBindableString
tostring
.ToastContentBuilder.AddComboBox
methods with params overloads have been removed. Use the remainingAddComboBox
method.