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

Drop .NET Framework and target .NET 8 on all platforms #1418

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mjcheetham
Copy link
Collaborator

@mjcheetham mjcheetham commented Sep 20, 2023

Depends on: #1417

Drop .NET Framework as the target framework on Windows in favour of .NET 8. Also update our Mac and Linux builds to .NET 8 from .NET 7. .NET 8 is an LTS release that is currently in a release candidate, which has a "go live" licence, and is due to GA in November 2023.

Now that we are targeting .NET 8 on all platforms we can drop all the .NET Framework specific code that we've been carrying. We also annotate all OS-specific code with the various attributes like [SupportedOSPlatform] to silence warnings and more importantly guard against accidentally using such code on the wrong platform (like in #1146).

Copy link
Contributor

@ldennington ldennington left a comment

Choose a reason for hiding this comment

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

Awesome! 🚀

@@ -26,10 +26,4 @@
<GenerateWindowsAppManifest Condition="'$(GenerateWindowsAppManifest)' == '' AND '$(OSPlatform)' == 'windows' AND '$(_IsExeProject)' == 'true'">true</GenerateWindowsAppManifest>
</PropertyGroup>

<ItemGroup Condition = "'$(TargetFramework)' == 'net472'">
Copy link
Contributor

Choose a reason for hiding this comment

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

Glad to be getting rid of this!

Annotate any OS or platform specific code with the new
(Un)SupportedOSPlatform(Guard) attributes and update various platform
util methods to use the OperatingSystem.Is<platform> methods.

This will help ensure we're not missing any OS checks in the future.

For test projects we ignore these warnings since we're using skipping
Xunit tests that are not applicable for the current platform already,
making these warnings just noise.
@hickford
Copy link
Contributor

@mjcheetham Any plan to return to this?

@hickford
Copy link
Contributor

hickford commented Apr 1, 2024

@mjcheetham Might you have time to look at this again?

@mjcheetham
Copy link
Collaborator Author

@mjcheetham Might you have time to look at this again?

Hey @hickford, we are still planning to update to .NET 8 on Mac and Linux, but as to Windows and dropping .NET Framework we're a little stuck right now because of a courtesy to Visual Studio (that bundle the same GCM version across all their versions) who need Windows 8.x support until.. 2029... 😢

I plan to reach out to them and find a way forward.

@mjcheetham
Copy link
Collaborator Author

In the meantime, here's the .NET 8 PR for Mac and Linux: #1579

@mjcheetham mjcheetham marked this pull request as draft April 15, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Refactoring or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants