I cloned the Oxide project after struggling to work out the appropriate assemblies to reference in my own project. Unfortunately, the sample plugin (Oxide.Game.Rust.Libraries.Rust) does not compile due to missing references. The documentation referred to BasePlayer, as does the sample plugin, but I cannot find where it exists. What is this class and where does it exist? I've seen static properties references from it, as well as documentation showing methods accepting this class as an argument.
Any help getting going here? Thanks.
Solved Where is the BasePlayer class?
Discussion in 'Rust Development' started by GEN3RIC, Dec 22, 2016.
-
This is the BasePlayer code which is in the Assembly-CSharp for Rust. Found under : C:\Program Files (x86)\Steam\steamapps\common\Rust\RustClient_Data\Managed\Assembly-CSharp.dll. To open it simply use a program such as dotPeek.
Screenshot
TXT file containing BasePlayer class:Attached Files:
-
-
This thread isn't really solved, and "Where is the BasePlayer class?" was not my question.
Please see the following screenshot, which comes straight from the github repo.
http://i.imgur.com/KosEARr.png
RustPlugin.cs does not know where BasePlayer is, and the class that R# suggests is incorrect.
As far as Assembly-CSharp.dll, yes, it does house many dependencies and act as a library of sorts, but importing that dll into a project's references does not automatically solve those dependency issues. -
Wulf Community Admin
The original question you had was: "What is this class and where does it exist", which is what was answered so far. -
Bear with me while I try to explain where my confusions lie.
1) The only BasePlayer class and, as you mentioned, in CSharp-Assembly.dll -> Dependencies/Rust.Data.dll
http://i.imgur.com/7A5HFS9.png
2) Unresolved references despite having CSharp-Assembly.dll in the references (this is your RustPlugin.cs)
http://i.imgur.com/MdwVRhd.png
3) Let ReSharper fix references
http://i.imgur.com/v4x39Wf.png
4) Clearly the wrong class
http://i.imgur.com/bM5fmft.png
My original question stands: why doesn't this compile out of the box? Is there a version mismatch between the assembly and the source code I cloned? I imagine you wouldn't commit to your main branch without it passing some kind of continuous integration checks, so I am confused why this doesn't work for me.
Thanks for taking the time to respond to my asinine line of questions. -
Wulf Community Admin
-
It's there. http://i.imgur.com/z4TrsUs.png
-
Wulf Community Admin
-
It's coming straight from your git repo. I've even re-downloaded all of those dependencies individually and added those assemblies manually to ensure it's using the correct one. Something peculiar is definitely happening here.
-
Wulf Community Admin