Skip to content

[.NET] Upgrade user project's TargetFramework to net8.0 - #100195

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
raulsntos:dotnet/upgrade-tfm
Dec 18, 2024
Merged

akien-mga merged 1 commit into
godotengine:masterfrom
raulsntos:dotnet/upgrade-tfm

Conversation

@raulsntos

Copy link
Copy Markdown
Member

@raulsntos raulsntos added this to the 4.4 milestone Dec 9, 2024
@raulsntos
raulsntos requested a review from a team as a code owner December 9, 2024 10:11
@Delsin-Yu

Copy link
Copy Markdown
Contributor

I'm not sure if it's an appropriate place to mention this, but the existing upgrade mechanism seems to removes the blank lines in csproj when updating, that is, the following csproj:

Details
<Project Sdk="Godot.NET.Sdk/4.3.0">

    <PropertyGroup>

        <TargetFramework>net8.0</TargetFramework>

        <LangVersion>12</LangVersion>

        <Nullable>enable</Nullable>

        <EnableDynamicLoading>true</EnableDynamicLoading>

    </PropertyGroup>

    <ItemGroup>

        <PackageReference Include="GDTask" Version="1.3.0"/>

        <PackageReference Include="gdUnit4.api" Version="4.3.1"/>

    </ItemGroup>

</Project>

will becomes this after the upgrade:

Details
<Project Sdk="Godot.NET.Sdk/4.4.0">
    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <LangVersion>12</LangVersion>
        <Nullable>enable</Nullable>
        <EnableDynamicLoading>true</EnableDynamicLoading>
    </PropertyGroup>
    <ItemGroup>
        <PackageReference Include="GDTask" Version="1.3.0"/>
        <PackageReference Include="gdUnit4.api" Version="4.3.1"/>
    </ItemGroup>
</Project>

@raulsntos

Copy link
Copy Markdown
Member Author

It's somewhat unrelated but an easy fix so I decided to include it.

@akien-mga

Copy link
Copy Markdown
Member

Needs rebase.

For the record the 4.4-dev7 build is planned for Thursday, do you want this PR included by then, or do you prefer to wait for it to be merged right after, and then included in beta1 in January?

- Upgrades the TFM for new created  projects to `net8.0`.
- Implements system to upgrade TFM for existing projects to `net8.0`.
@raulsntos

Copy link
Copy Markdown
Member Author

I would prefer to include it in 4.4-dev7 so it's in the same release that makes net8.0 the new minimum. But we can also just tell users to modify their .csproj manually until beta1.

@akien-mga
akien-mga merged commit 6cba629 into godotengine:master Dec 18, 2024
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@raulsntos
raulsntos deleted the dotnet/upgrade-tfm branch December 18, 2024 21:45
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
[.NET] Upgrade user project's TargetFramework to `net8.0`
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
[.NET] Upgrade user project's TargetFramework to `net8.0`
wangshucheng pushed a commit to wangshucheng/godot that referenced this pull request Aug 27, 2026
[.NET] Upgrade user project's TargetFramework to `net8.0`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants