1. Hi,

    I've created a plugin that relies on a third party library installed via NuGet in Visual Studio, however I'm having trouble getting Oxide to load it. I thought you'd simply drop the .dll in the Managed directory however it doesn't get recognised unless it has an "Oxide.Ext.Something" filename.

    How can I go about loading this library?

    Thanks,
    .#Crash
     
  2. Wulf

    Wulf Community Admin

    Plugins are not compiled as DLLs, they are installed under oxide/plugins in .cs format. Extensions for Oxide are something else entirely, and are made in a certain format and installed under the Managed directory as a compiled .dll. If there is a library DLL you want to reference in a plugin, you can do so by adding "// Reference: FileName" to the top of the plugin using it; ex. // Reference: UnityEngine.
     
  3. If dll to byte array and load assembly?
     
  4. Ah ok, thanks Wulf. I didn't make it clear what I meant by "you'd simply drop the .dll in the Managed directory" - I was on about the third party library I'm referencing. The plugin is just a class file and is in the Plugins folder as it should be.

    Also, If I'm understanding this right, I include "// Reference: FileNameOfLibrary" at the top of my class file (above the using directives) and then place the library .dll where?

    Thanks,
    .#Crash
     
  5. Wulf

    Wulf Community Admin

    Yes, RustDedicated_Data/Managed is where the DLL would go that you are wanting to reference and then use the // Reference like I mentioned.
     
  6. Excellent. Working perfectly now. Thanks a lot!