JiepengTan / libgodot_llgo_demo

3 stars 0 forks source link

Godot-dotnet build fails #2

Closed GeorgeS2019 closed 1 month ago

GeorgeS2019 commented 1 month ago

If I just download your repos on godot-dotnet, I am able to build.

However, once I replace the json and .h files, these errors happen

C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018: The "GenerateTask" task failed unexpectedly.
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018: System.InvalidOperationException: Type for engine name 'const GDExtensionInitializationFunction*' (metadata: '') n
ot found.
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Godot.BindingsGenerator.TypeDB.GetTypeFromEngineName(String engineTypeName, String engineTypeMeta) in 
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.BindingsGenerator\Marshalling\TypeDB.cs:line 156
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Godot.BindingsGenerator.EngineClassesBindingsDataCollector.PopulateEngineClassMethods(CollectionContext cont
ext, GodotClassInfo engineClass) in C:\libgodot_llgo_demo\godot-dotnet\src\Godot.BindingsGene
rator\BindingsDataCollectors\EngineClassesBindingsDataCollector.cs:line 265
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Godot.BindingsGenerator.EngineClassesBindingsDataCollector.Populate(CollectionContext context) in Godot C:\libgodot_llgo_demo\godot-dotnet\src\Godot.BindingsGenerator\BindingsDataCollectors\EngineClassesBind
ingsDataCollector.cs:line 80
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Godot.BindingsGenerator.BindingsData.PopulateTypes(CollectionContext context) in Godot C:\libgodot_llgo_demo\godot-dotnet\src\Godot.BindingsGenerator\BindingsGenerator\BindingsData.cs:line 88
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Godot.BindingsGenerator.BindingsData.Create(GodotApi api, BindingsGeneratorOptions options, ILogger logger)
in C:\libgodot_llgo_demo\godot-dotnet\src\Godot.BindingsGenerator\BindingsGenerator\BindingsD
ata.cs:line 69
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Godot.BindingsGenerator.BindingsGenerator.Generate(GodotApi api, String outputDirectoryPath, BindingsGenerat
orOptions options, ILogger logger) in C:\libgodot_llgo_demo\godot-dotnet\src\Godot.BindingsGe
nerator\BindingsGenerator\BindingsGenerator.cs:line 19
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Godot.BindingsGenerator.GenerateTask.Execute() in C:\libgodot_llgo_demo\godot-dotn
et\src\Godot.BindingsGenerator\GenerateTask.cs:line 54
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\libgodot_llgo_demo\godot-dotnet\src\Godot.Bindings\Godot.Bindings.csproj(41,5): error MSB4
018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggin
gContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
JiepengTan commented 1 month ago

This is a bug in Godot-CSharp. I haven't looked closely at its source code, and I don't have time to deal with it today. I will try to fix it over the weekend.

JiepengTan commented 1 month ago

@GeorgeS2019 The bug you reported belongs to the godot-dotnet repository. I have TEMPORARILY bypassed that error and added functionality to the init_env.bat to automatically replace the json and .h files. You can cd back to the godot-dotnet directory and pull the latest code.

To be honest, the godot-dotnet repository is not very suitable for C# testing.

GeorgeS2019 commented 1 month ago

@JiepengTan I use this for test driven godot c# development, including integration End to End c# godot tests https://github.com/MikeSchulze/gdUnit4Net/discussions/28#discussioncomment-8522526

GeorgeS2019 commented 1 month ago

I got the cube demo in project folder working