Adding third party assemblies to plugins

Hi there,

I'm working on a plugin that can edit media, sounds.

For that, I use NAudio.Wave or other libraries.

What's the best way to add new libraries to rust/oxide/plugins?

Currently I load the assembly dynamically with "Assembly.LoadFrome(filename)" and then I access the methods, properties etc. with reflection.

 

Isn't there a better way of registering assemblies to oxide so I can just use their namespaces with, for example "using Naudio.Wave;" in the first few lines of my plugin?

 

May be related to my other question, but it's slighly different.

In this question I want to access an existing DLL (that comes with rust)
https://umod.org/community/general-support/53407-adding-new-assemblies-towith-oxide-patcher

And in this topic I want to use/access third party assemblies.

Thanks a lot

Mac

You can reference any assembly in the managed directory by adding:

//Reference: <assembly name>​

For example if you need to use the Facepunch.Rcon assembly you can do

//Reference: Facepunch.Rcon