1. 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.
     
  2. 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:

  3. 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.
     
  4. Wulf

    Wulf Community Admin

    BasePlayer comes from Assembly-CSharp.dll. If it is not referencing it, you'd need to set it up in that plugin so it does.

    The original question you had was: "What is this class and where does it exist", which is what was answered so far.
     
  5. 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.
     
  6. Wulf

    Wulf Community Admin

    All of that is correct except that BasePlayer is from Assembly-CSharp, not Protobuf or Rust.Data.dll like you are trying to reference. The BasePlayer class is in Assembly-CSharp.dll, so it sounds like you're somehow missing that reference. The DLL is included with Oxide under the dependencies folder and a reference is already setup for that, so I'd double-check that both of those are still there.
     
  7. Wulf

    Wulf Community Admin

    Then you'd need to specify which one to use, as your Visual Studio is trying to reference one it isn't supposed to reference.
     
  8. 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.
     
  9. Wulf

    Wulf Community Admin

    Yup, because it's not been an issue for 2 years and I use it as-is daily. ;)