rules_dotnet icon indicating copy to clipboard operation
rules_dotnet copied to clipboard

[Next] NuGet rules do not yet handle the runtimes folder

Open njlr opened this issue 2 years ago • 3 comments

Probably easiest to see the repro here: https://github.com/njlr/rules-dotnet-issue-native

Basically a Nuget package with native code (MonoGame.Framework.DesktopGL) does not get linked in correctly:

$ bazel run //:app

Unhandled exception. System.TypeInitializationException: The type initializer for 'Sdl' threw an exception.
 ---> System.Exception: Failed to load library: libSDL2-2.0.so.0
   at MonoGame.Framework.Utilities.FuncLoader.LoadLibraryExt(String libname)
   at Sdl.GetNativeLibrary()
   at Sdl..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.Xna.Framework.SdlGamePlatform..ctor(Game game)
   at Microsoft.Xna.Framework.GamePlatform.PlatformCreate(Game game)
   at Microsoft.Xna.Framework.Game..ctor()

njlr avatar Aug 03 '22 16:08 njlr

@njlr This is known issue with the next branch. The new NuGet handling is not yet handling the runtimes folder. I'm planning on fixing this soon since I need this to be able to start using the next branch with my work monorepo.

I'm currently working on some dependency resolution fixing in the next branch and this was the next item I was going to tackle.

purkhusid avatar Aug 03 '22 20:08 purkhusid

@njlr This is known issue with the next branch. The new NuGet handling is not yet handling the runtimes folder. I'm planning on fixing this soon since I need this to be able to start using the next branch with my work monorepo.

I'm currently working on some dependency resolution fixing in the next branch and this was the next item I was going to tackle.

That's great to hear! I will give it a try once it's ready.

Is this issue a dupe then?

njlr avatar Aug 03 '22 20:08 njlr

No, let's keep this open to track this.

purkhusid avatar Aug 03 '22 20:08 purkhusid

Works when using the branch in this PR:

https://github.com/njlr/rules-dotnet-issue-native/tree/fix

njlr avatar Aug 28 '22 20:08 njlr

This has now been fixed on the next branch

purkhusid avatar Aug 31 '22 15:08 purkhusid