BulletSharp icon indicating copy to clipboard operation
BulletSharp copied to clipboard

C# Demo Build Issues - Consistent Versions of Dependencies?

Open MikePelton opened this issue 3 years ago • 1 comments

I really struggled to get the C# demos working because I think it's far from clear what the inter-relationship between the published versions of BulletSharp and the dependencies are. Please note that no criticism is implied - this is a fantastic project. In case anyone else comes this route, I got the C# demos from ~\AndresTraks-BulletSharp-c277666\demos\SharpDX to build and run against the pre-built binary 64-bit version of BulletSharp.dll version 2.87 from https://andrestraks.github.io/BulletSharp which has a hard dependency on SharpDX 4.1 (not the more recent stable version 4.2). 4.1 is available via Nuget. Beware ...trying to use the BulletSharp from Nuget threw up a number of compiler issues with the DemoFramework code.

MikePelton avatar Dec 26 '20 12:12 MikePelton

No, that's fair :). BulletSharp and the demos were originally written before NuGet was a thing, so it's all a bit messy.

The version of BulletSharp that is up on NuGet is actually this one: https://github.com/AndresTraks/BulletSharpPInvoke/ P/Invoke is a newer method of interop that provides compatibility with Unix-based systems without sacrificing too much performance over C++/CLI. There's more reasons to choose one or the other, but I would generally recommend P/Invoke for all new projects. The C++/CLI and P/Invoke versions are very similar, but not exactly compatible, because they have had different design goals.

I haven't had the time to make it all clear in the documentation, but eventually I'd like to:

  • retire the C++/CLI version of BulletSharp and not tie BulletSharp to any specific graphics libraries (there is already the generic version in C++/CLI),
  • move everything to .NET Core,
  • put BulletSharp and the demos into a single solution, so that the dependencies are clear,
  • rewrite the demos to fully make use of NuGet (except for linking to BulletSharp itself, because that would make development difficult).

AndresTraks avatar Dec 26 '20 13:12 AndresTraks