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
Solved Referencing a third party library in plugin?
Discussion in 'Rust Development' started by .#Crash, Feb 27, 2017.
-
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.
-
-
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 -
Wulf Community Admin
-
Excellent. Working perfectly now. Thanks a lot!