Can I use the Godot .NET version and ship a build without .NET?

Godot Version

4.2.2

Question

TL;DR. I want to use the .NET version of Godot exclusively for the Godot community-made tools, but don’t want any .NET at all in the shipping executable.

We’re developing a game using GDExtension (C/C++) as the primary language for the game and only intend to use GDScript for any necessary glue required (none needed so far). Some tools created by the Godot community require the .NET version of Godot to use. If we don’t write a single line of C# code in our project, will .NET and all of it’s bindings be stripped from the final built executable? If not, are there any issues with loading a project developed in the .NET version of Godot into the standard version of Godot for a shipping build so that .NET doesn’t exist?

Thanks!

This depends largely on the tools in question if they have any build or runtime .Net dependencies. If this is important to you then you should do all your builds in standard version of Godot editor to make sure that no such dependencies to .Net exists.

But generally I would assume that if tool requires .Net version of Godot then that any projects that use that tool will have build and runtime .Net dependencies and thus will not work without .NET.

Thank you for the reply, you made me realize that I forgot to mention a key factor which was that the tools are editor-only tools and will not be built into the shipping executable. We’re likely not going to have any community-code running in the final runtime executable, just our C++ code and any GDScript glue. The C# tools are just for ease of use in-editor, nothing from C# will be going into the runtime build.

I’m curious if Godot considers this (seeing how there are 2 versions of the editor to download). Basically, does the build pipeline check to see if C# is used at all in the final build and if not strip it? Or does it just always compile in the C# runtime anyways because it was built in the C# version of Godot?

Neither of those is exactly true. It’s possible to use the .NET flavoured version of Godot and still make an export that doesn’t contain anything about .NET. But this is conditioned by the existence of your .csproj (and .sln) file. There is currently no way of telling the engine to not include the existing .NET solution when performing a build without TOOLS.

2 Likes