1. I'm currently in the very early stages of making an extension for the Oxide Core which runs along side with the Rust extension. I can compile the code fine. The extension is loaded into the by Oxide without errors, its only when unity starts to initialise(i think) when i start getting errors.

    The error:
    Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'Oxide.Ext.MyExt'.
    upload_2018-5-2_23-27-35.png

    My code:
    upload_2018-5-2_23-33-51.png
    The code is bare bones, but i just wanted to make sure it's working fine. I'm targeting with .net Framework 4.6.1. Could this be the error? Do i have to do specific initialisation for extensions?

    Best wishes,
    Sililia
     

    Attached Files:

  2. Wulf

    Wulf Community Admin

    You need to compile for .NET 3.5, which is what Rust and Unity uses.
     
  3. This is for other with this problem especially Windows 8 and above Visual studio >2015, it doesn't show targeting for .net 3.5. By default, .net3.5 is disabled since Microsoft want to stop supporting it? https://support.microsoft.com/en-gb/lifecycle/search/548
    To enable it, Search "Windows features", for me it was the first option, enable it. It will download through windows update; restart and you use .net 3.5 targeting on your IDE.
    upload_2018-5-3_12-41-49.png

    Hope it helped.

    EDIT:
    Thanks for the reply @Wulf
     
  4. Wulf

    Wulf Community Admin

    You'd need to install the .NET 3.5 target framework in Visual Studio.
     
  5. Just to clarify as I’m unsure if you’re contradicting what I was saying.
    No matter how many times you install or reinstall the developer pack and or targeting pack for .net 3.5, if it’s disabled as a windows feature; visual studio will be unable to target it.