Building a .NET Core console app in ubuntu - looks for windows dll's instead of .so files of c# nuget with native code

Viewed 81

I have a c# nuget package that uses some native (c++) code, which supports cross-platform development, meaning that when you call the c# nuget from another project, depending on the OS it will either pull the .so files (linux) or the .dll files (windows).

Now I have a console app to test some code (.net core 3), which also calls indirectly the above mentioned c# nuget. I want to build and run this console app in ubuntu 18.04. Problem is, when I build the console app, I get the .so files as expected, but when I run it, the app looks for the .dll files and complains that they are not there (which they are not, so I get a DLLNotFound Exception). Does anyone know why during build time a console app in linux builds with a "windows behavior" ? I guess it has something to do with the way .NET builds stuff in linux.

P.S. : When I use the aforementioned c# nuget as a microservice in a linux environment, everything works fine.

0 Answers
Related