It is necessary to define an own class library to be installed on the server for plug-in calling. How to install such library DLL into the server Oxide so that the plug-in can use the custom functions, properties and other functions in the class library.
I tried to put it in the Managed folder, but the class library could not be obtained correctly when loading the plug-in, and it prompted that it does not exist.
How to add custom DLL class library for Rust ?Solved
You'd need to add it as a reference.
// Reference: DLLName
Wulf
You'd need to add it as a reference.
// Reference: DLLName


As shown in the figure, the class library has been referenced in the plug-in.

As a result, the error is still reported as shown in the figure, indicating that the class library has not been added.
It has been added as shown in the data, and the result is still the same. I don't know where the error is, and I can't find the root cause. Please clarify, thank you very much!
Please make sure you are not using the Oxide namespace. If you are writing an extension, it would be Oxide.Ext.YourName for the name and namespace.
Sorry to bother you again! According to your prompt, I have modified it, and it can be referenced correctly now, but it still prompts that the DLL has not been loaded, and the error is shown in the following figure:![]()
![]()
The plugin shown after listing the plugin list also did not load successfully with a status of Test - Unloaded.
Wulf
Please make sure you are not using the Oxide namespace. If you are writing an extension, it would be Oxide.Ext.YourName for the name and namespace.
I corrected it according to your instructions. It seems that the DLL can be obtained normally. However, after calling it in the plugin, the plugin still cannot be loaded normally, and the status of Unloaded is still displayed.
Below are screenshots of the various places:



![]()
How can I make adjustments at this point?
Sorry to trouble you again.
Is your dll actually an extension?
Wulf
Is your dll actually an extension?
Hello! It really belongs to Extension. At present, I have made corrections after comparing it with related projects on Oxide GitHub according to your answer. After adding Extension and Loader, this problem has been solved.
But now I found a new problem: when I referenced the DLL library and created a variable with new List<string>(), there was no warning in the actual writing of the plug-in that it was necessary to refer to "System.Collections.Generic" ", but when I finish writing, the server prompts that a reference is required; when I manually add a reference to the plugin and reload the plugin, it can be used normally. What settings should I make when generating the DLL to avoid this from happening?
That looks like a missing using statement. Make sure you are targeting LangVersion 6 in your csproj.
Wulf
That looks like a missing using statement. Make sure you are targeting LangVersion 6 in your csproj.
Yes, the Using reference is missing, and it is solved after adding the reference; however, when writing the plug-in, the plug-in does not prompt the missing reference, only the server will prompt the missing reference when the plug-in is installed.