Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

446
Vistas
Runtime path for DllImport Attribute on Linux

I'm looking for a solution for dynamically change the dll path when using DLLImport attribute under Linux. I have an if statement for checking the current OS (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)), and if the application runs on windows than I'm using the SetDllDirectory method from kernel32.dll to dynamically add a folder to the dll search path.

For Windows I have two different dlls to load based on some runtime decision. they will be located at Environment.CurrentDirectory + Drivers/Win/1/ and Environment.CurrentDirectory + Drivers/Win/2/.

For Linux, the .so will be located at Environment.CurrentDirectory + Drivers/Linux/

The dlls and so files have the exact same interface and name.

Is there an equivalent solution like SetDllDirectory for Linux under .NET 5?

Thanks

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda