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

Add net9.0 target #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Setup .NET 9
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x

- name: Install Node.js
uses: actions/setup-node@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,10 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Setup .NET 9
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x

- name: Build Script
run: dotnet run -p build/build.csproj -- ci
5 changes: 5 additions & 0 deletions .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Setup .NET 9
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x

- name: Pack
run: dotnet pack src/Oakton/Oakton.csproj --configuration Release

Expand Down
4 changes: 2 additions & 2 deletions src/Oakton/Oakton.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<AssemblyTitle>Oakton</AssemblyTitle>
<PackageVersion>6.2.1</PackageVersion>
<Authors>Jeremy D. Miller</Authors>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Oakton</AssemblyName>
<OutputType>Library</OutputType>
Expand All @@ -19,7 +19,7 @@
<ItemGroup>
<PackageReference Include="JasperFx.Core" Version="1.5.1" />
<PackageReference Include="Spectre.Console" Version="0.47.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[6.0.0,9.0.0)" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[6.0.0,10.0.0)" />
Copy link
Contributor

@ArturDorochowicz ArturDorochowicz Nov 14, 2024

Choose a reason for hiding this comment

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

What's the point of this range?

I suspect that the PR submitter just bumped this automatically, so this is not in any way a remark to this PR. But maybe this PR is an opportunity to remove it.

All this does in practice is placing an artificial upper limit on valid versions. Such behavior is typically frowned upon. If someone installs just Oakton in a new project, they will get 6.0.0 (no matter the target framework), because that's how NuGet's version resolution works.

Copy link
Author

Choose a reason for hiding this comment

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

Nothing was automatic, but after a discussion with Jeremy on Discord it was decided the
.net 9 PRs would not change anything regarding existing TFM support. As such, since this already used a version range I simply bumped the maximum to allow for 9.x.x

Happy to fix it in this PR, but for posterity it would be better off being a distinct issue + PR.

</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>

<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down