Skip to content

NuGet package missing build/GoudEngine.targets — 60x overhead vs local build #670

Description

@aram-devdocs

Bug

GoudEngine NuGet 0.0.841 does not include the build/GoudEngine.targets file in the package. This file is responsible for copying the native library (libgoud_engine.dylib) to the output directory root, where .NET's P/Invoke loader finds it directly.

Without this file, the native library stays buried in runtimes/osx-arm64/native/ and the .NET runtime uses a fallback resolution path.

Impact

Throne (using NuGet 0.0.841) gets 1.1 FPS with 282 entities.
Character sandbox (using local project-reference to same code) gets 57 FPS with 280 agents.

The overhead per frame is ~790ms for the NuGet path vs ~14ms for local. Sim and render times are comparable.

Reproduction

  1. Reference GoudEngine 0.0.841 from NuGet in any C# project
  2. Run the project and measure frame timing
  3. Compare with the same project using a local ProjectReference to sdks/csharp

Expected

The NuGet package should include build/GoudEngine.targets so consuming projects get the native library copied to their output root automatically (matching the local build behavior).

Affected Versions

  • 0.0.841 (confirmed)
  • Likely 0.0.840 and earlier as well

Workaround

Consumers can add a manual copy target in their .csproj:

<Target Name="CopyGoudEngineNativeLib" AfterTargets="Build">
  <PropertyGroup>
    <GoudNativeLib Condition="...">$(NuGetPackageRoot)goudengine/VERSION/runtimes/osx-arm64/native/libgoud_engine.dylib</GoudNativeLib>
  </PropertyGroup>
  <Copy SourceFiles="$(GoudNativeLib)" DestinationFolder="$(OutputPath)" SkipUnchangedFiles="true" />
</Target>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions