You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update .NET dependencies to C# 13.0 and .NET 9.0 (#834)
This PR updates the project dependencies to use the latest stable
versions of .NET and C# while maintaining compatibility and ensuring no
tests break.
## Changes
Updated three key configuration files to modernize the .NET stack:
- **global.json**: SDK version updated from `8.0.0` → `9.0.0`
- **Directory.Build.props**: LangVersion updated from `12.0` → `13.0`
(C# 13)
- **Common.props**: TargetFrameworks updated from `net8.0;net7.0;net6.0`
→ `net9.0;net8.0`
Updated documentation to reflect the new versions:
- **README.md**: Updated requirements section from ".NET 8.0, 7.0, and
6.0" to ".NET 9.0 and 8.0"
- **Errata.md**: Updated title from "Essential C# 12.0" to "Essential C#
13.0"
- **.github/actions/setup-dotnet/action.yml**: Updated dotnet-version
list from `6.0.x`, `7.0.x`, `8.0.x` to `8.0.x`, `9.0.x`
## Rationale
- **Removes EOL framework warnings**: .NET 6.0 and 7.0 are out of
support and were generating NETSDK1138 warnings
- **Enables C# 13.0 features**: Projects can now use the latest C#
language features
- **Reduces multi-targeting overhead**: Simplified from 3 to 2 target
frameworks while maintaining modern platform support
- **Maintains compatibility**: Kept .NET 8.0 as a secondary target for
broader compatibility
## Validation
✅ **Build**: Solution builds successfully with 0 errors
✅ **Tests**: All tests pass across both target frameworks (net9.0 and
net8.0)
✅ **Warnings**: No new warnings introduced; only expected warnings
remain (intentional `#warning` directives and SYSLIB warnings for code
examples)
✅ **SDK**: Verified using .NET 9.0.305 SDK
All existing tests continue to pass, confirming no breaking changes were
introduced.
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
> Update the .net dependencies as much as we can without
>
> 1. Breaking out tests
> 2. Causing any build warnings or errors
>
>
> You can update TFM's and LangVersion (and global.json) - but only to
C# 13.0 and it's compatible .net version (I think .net 9.0?)
>
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/IntelliTect/EssentialCSharp/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: BenjaminMichaelis <[email protected]>
Co-authored-by: Benjamin Michaelis <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This project contains the source code for the book **Essential C#** by Mark Mich
8
8
9
9
## Requirements
10
10
11
-
-[.NET](https://www.microsoft.com/net/core) - This project is currently tested against .NET 8.0, 7.0, and 6.0.
11
+
-[.NET](https://www.microsoft.com/net/core) - This project is currently tested against .NET 9.0 and 8.0.
12
12
-[Visual Studio](https://visualstudio.microsoft.com/downloads/) - Already contains .NET Core to get up and running. Not to mention, it's a great IDE that makes it easy to get started.
13
13
-[Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - While not required, a good tool to get used to, and easy way to download this code repository quickly. [GitKraken](https://gitkraken.cello.so/tl7bYaRLgzT) is a great GUI for using Git if you prefer not using the command line. Visual Studio and VSCode also have ever improving git tooling built in.
0 commit comments