Skip to content

Add .net standard 1.4 target to Microsoft.Toolkit project. #3293

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

Merged
merged 8 commits into from
Jul 27, 2020
Merged

Add .net standard 1.4 target to Microsoft.Toolkit project. #3293

merged 8 commits into from
Jul 27, 2020

Conversation

matthew4850
Copy link
Contributor

PR Type

What kind of change does this PR introduce?

  • Add support to older .net standard versions

What is the new behavior?

The Microsoft.Toolkit project may now be used in .net standard 1.4 projects.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

@ghost
Copy link

ghost commented May 18, 2020

Thanks matthew4850 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 🙌

@ghost ghost assigned michael-hawker May 18, 2020
@dnfclas
Copy link

dnfclas commented May 18, 2020

CLA assistant check
All CLA requirements met.

@dnfclas
Copy link

dnfclas commented May 18, 2020

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ matthew4850 sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few suggested changes, once those are accepted the rest looks good to me! 🚀

@ghost
Copy link

ghost commented May 18, 2020

This PR has been marked as "needs attention 👋" and awaiting a response from the team.

@michael-hawker
Copy link
Member

@Sergio0694 @azchohfi can you help me understand the ramifications here? It shouldn't make a difference to anyone using a newer engine version like UWP 16299+ or .NET Core 3, eh?

What happens in the future if we want to add an API that's only supported on 2.0+, then we'd have to box it in an ifdef and it'd be left out of the package for anyone on 1.4??

@ghost ghost removed the needs attention 👋 label May 28, 2020
@azchohfi
Copy link
Contributor

Yes, that is exactly it.
I wonder why @matthew4850 wants this. 1.4 is very old.
https://docs.microsoft.com/en-us/dotnet/standard/net-standard
Is it for older UWP target (10.0) support?

@Sergio0694
Copy link
Member

Sergio0694 commented May 28, 2020

@azchohfi Yup, Matthew is still targeting Windows 10 Mobile in his app (yeah, he's a mad lad), so he's locked to .NET Standard 1.4, as mobile is stuck on Windows 10 build 15063 😆

@michael-hawker Yeah, as Alex said it makes absolutely no difference for newer platforms. NuGet will automatically pick the closest possible match for the current platform when installing the package.

@michael-hawker
Copy link
Member

@azchohfi I think the motivation here is (as @Sergio0694 said) is that we don't explicitly use anything unique to .NET Standard 2.0, so we can target the lowest denominator for now to have broader reach.

Should we take this for 6.1?

@Sergio0694
Copy link
Member

@michael-hawker The new HighPerformance package supports extensive multi-target as well (including .NET Standard 1.4), so especially considering how small this PR is, and the fact that it's not breaking anything, I guess it should be fine to include this in 6.1 if you want 👍

@ghost
Copy link

ghost commented May 28, 2020

This PR has been marked as "needs attention 👋" and awaiting a response from the team.

@azchohfi
Copy link
Contributor

I'm ok merging this for 7.0. @michael-hawker ?

@ghost ghost removed the needs attention 👋 label Jul 10, 2020
@azchohfi azchohfi requested a review from Sergio0694 July 10, 2020 21:22
Copy link
Member

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is valid and @matthew4850 had already done a couple tweaks I had suggested, so this is good to go for me. Just as a note though, the original interest was to be able to use the base package on Windows 10 Mobile (so W10 with SDK < 16299), which lacks support for .NET Standard 2.0. This will still not work due to a known .NET Native issue there (lack of support for Span<T> APIs which causes a build failure as soon as you add a reference to System.Memory.

So the package itself will still not work on Windows 10 Mobile, if that matters.
The PR itself though is perfectly valid on its own 👍

@Sergio0694
Copy link
Member

This PR is good to go (up to date, reviewed with two approvals, etc.), and the CI is passing as well.
Just holding off on this for @michael-hawker to confirm this is fine to merge (see question from @alexchx here) 👍

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test this out and see how all the multi-targeting stuff goes. Worse case if we need a new feature and it gets messy we bump back up in the future.

Thanks for the contribution @matthew4850 and pushing the bounds of the Toolkit! 🎉

@michael-hawker michael-hawker merged commit 3e4ba97 into CommunityToolkit:master Jul 27, 2020
@michael-hawker michael-hawker added this to the 7.0 milestone Jul 27, 2020
@michael-hawker michael-hawker added .NET Components which are .NET based (non UWP specific) improvements ✨ labels Jul 27, 2020
Sergio0694 added a commit to Sergio0694/WindowsCommunityToolkit that referenced this pull request Jul 27, 2020
Sergio0694 added a commit to Sergio0694/WindowsCommunityToolkit that referenced this pull request Jul 27, 2020
@ghost ghost added the Completed 🔥 label Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Completed 🔥 improvements ✨ .NET Components which are .NET based (non UWP specific)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants