Merge pull request #110263 from raulsntos/dotnet/android-net9.0

[.NET] Require `net9.0` for Android exports
This commit is contained in:
Thaddeus Crews
2025-09-05 08:37:22 -05:00
committed by GitHub
4 changed files with 9 additions and 3 deletions

View File

@@ -2739,6 +2739,7 @@ bool _validate_dotnet_tfm(const String &required_tfm, String &r_error) {
List<String> args;
args.push_back("build");
args.push_back(project_path);
args.push_back("/p:GodotTargetPlatform=android");
args.push_back("--getProperty:TargetFramework");
int exitcode;
@@ -2778,9 +2779,9 @@ bool EditorExportPlatformAndroid::has_valid_export_configuration(const Ref<Edito
err += TTR("Exporting to Android when using C#/.NET is experimental.") + "\n";
if (!gradle_build_enabled) {
// For template exports we only support .NET 8 because the template
// includes .jar dependencies that may only be compatible with .NET 8.
if (!_validate_dotnet_tfm("net8.0", err)) {
// For template exports we only support .NET 9 because the template
// includes .jar dependencies that may only be compatible with .NET 9.
if (!_validate_dotnet_tfm("net9.0", err)) {
r_error = err;
return false;
}