1. Besides the switch to MSVC 2017, is there any reason why a custom extension of mine would stop loading as of the recent OxideMod release? I have an extension DLL that's been loading fine, patch after patch from Oxide, without being recompiled that now doesn't load. Is that because I need to go forward and re-compile it with MSVC 2017 (It was last compiled with MSVC 2015)? Or is there a more structural change needed for my custom DLL extension to work with newer OxideMod build?
     
  2. Wulf

    Wulf Community Admin

    I'd need to see logs and details, I can't really help with no information.
     
  3. Code:
    20:01 [Info] AutoGrades, CopyPaste and EnhancedHammer were compiled successfully in 2796ms
    20:01 [Error] Error while compiling: MyPlug.cs(18,17): error CS0246: The type or namespace name `MyExt' could not be found. Are you missing an assembly reference?
    20:01 [Info] Loaded plugin Automatic Build Grades v0.0.18 by AlexALX
    20:01 [Info] Loaded plugin Copy Paste v3.3.7 by Reneb
    I've got a plugin that instantiates something I created in an extension to get outside of the sandbox. Originally, I used the MySQL extension as a scaffolding to create mine although it has nothing to do with MySQL. If you want me to first just move my extension project over to MSVC 2017, I will. But I do know it was working for a couple of weeks now past when I saw you mention switching to MSVC 2017 on your side. I haven't recompiled this thing on my end for a at least a month. Thanks for any help
     
  4. Wulf

    Wulf Community Admin

    The version of Visual Studio you use wouldn't matter, that's just for Oxide. Some changes were made to how extensions are referenced and the references they import, though there shouldn't have been any changes to custom extensions (technically all of Oxide is extensions), especially since I know others are working just fine.

    What do your plugin's using statements look like?
     
  5. The plugin is really a universal stub to get to the extension from other plugins. I was preparing to make it more universal directly from the extension and not need this universal stub. I read through most of the OxideMod code and saw how I could do better than just copying the MySQL way of requiring a plugin to instantiate it before using it. The original design is from about a year ago and likely wasn't super perfect at the time, but worked well enough for me to proceed. Here's the plugin

    Code:
    namespace Oxide.Plugins
    {
        [Info("MyExtUniversal", "Kolyma", "1.0")]
        class MyExtUniversal : CovalencePlugin
        {
            private MyExt ext;        private void Init()
            {
                ext = new MyExt();
            }
    And a piece of the extension:

    Code:
    using Oxide.Core;
    using Oxide.Core.Extensions;namespace Oxide.Ext.MyExt
    {
        public class MyExtExtension : Extension
        {
            public override string Name => "MyExt";        public override VersionNumber Version => new VersionNumber(1, 0, 0);        public override string Author => "Kolyma";        private Libraries.MyExt MyExt;        public MyExtExtension(ExtensionManager manager) : base(manager)
            {
            }        public override void Load() => Manager.RegisterLibrary("MyExt", MyExt = new Libraries.MyExt());        public override void LoadPluginWatchers(string pluginDirectory)
            {
            }        public override void OnModLoad()
            {
            }
        }
    }
    The starting area of the other file from the extension:

    Code:
    namespace Oxide.Ext.MyExt.Libraries {    public class MyExt : Library {
    Of course there's a lot more in that file.
     
  6. Wulf

    Wulf Community Admin

    Might be an issue with how we get the references right now, but try adding a using statement for your extension in your plugin.
     
  7. Oh I should have included the top of the plugin. I already had the using statement:
    Code:
    using Network;
    using System;
    using Oxide.Ext.MyExt.Libraries;
    using Oxide.Core.Libraries;namespace Oxide.Plugins
    {
        [Info("MyExtUniversal", "Kolyma", "1.0")]
        class MyExtUniversal : CovalencePlugin
        {
    I updated my dev environment to MSVC 2017, moved my extension over, adjusted the assembly references and got it to build using the newer OxideMod sources. Still no joy. Back when it worked, I would see my extension report in during the server boot, but not now even though it's in the directory:
    Code:
    Loaded extension Rust v2.0.3600 by Oxide and Contributors
    Loaded extension SQLite v2.0.3600 by Oxide and Contributors
    Loaded extension Unity v2.0.3600 by Oxide and Contributors
    Using Covalence provider for game 'Rust'
    Loading plugins...
    Loaded plugin Rust v2.0.3600 by Oxide and Contributors
    I suppose I need to read through the updated OxideMod sources and see how you're loading extensions now. Mine ends up being named Oxide.Ext.MyExt.dll which used to load OK, even past the time when you stopped calling the other core extensions by that Oxide.Ext.MySql.dll naming convention and moved to Oxide.Core.MySql.dll
     
  8. Wulf

    Wulf Community Admin

    That name doesn't matter anymore, other extensions still use Oxide.Ext.*.dll naming and load fine. Does adding the // Reference: Oxide.Ext.MyExt at the top of your plugin help?
     
  9. Code:
    Ignored unnecessary '// Reference: Oxide.Ext.MyExt' in plugin 'MyExtUniversal'
    Error while compiling: 'MyExtUniversal.cs(20,17): error CS0246: The type or names
    pace name `MyExt' could not be found. Are you missing an assembly reference?
    The second message of course is one I've been getting all along
     
  10. Wulf

    Wulf Community Admin

    Try the below under RustDedicated_Data/Managed if you could please. Made some tweaks to the extension reference handling.

    Edit: Going to post another version in a sec.
     
    Last edited: Oct 21, 2017
  11. MyExt extension loads now but new errors in plugin section
    Code:
    Local compiler MD5: 5fbca0bf39b1c09ddf2fb3686b869242
    Loaded extension CSharp v2.0.0 by Oxide and Contributors
    Loaded extension MyExt v1.0.0 by Kolyma
    Loaded extension MySql v2.0.3600 by Oxide and Contributors
    Loaded extension Rust v2.0.3600 by Oxide and Contributors
    Loaded extension SQLite v2.0.3600 by Oxide and Contributors
    Loaded extension Unity v2.0.3600 by Oxide and Contributors
    Using Covalence provider for game 'Rust'
    Loading plugins...
    Loaded plugin Rust v2.0.3600 by Oxide and Contributors
    Loaded extension Unity v2.0.3600 by Oxide and Contributors
    Using Covalence provider for game 'Rust'
    Loading plugins...
    Loaded plugin Rust v2.0.3600 by Oxide and Contributors
    Loaded plugin Unity v2.0.3600 by Oxide and Contributors
    Failed to load plugin 'AutoGrades' (multiple sources found)
    Failed to load plugin 'CopyPaste' (multiple sources found)
    Failed to load plugin 'EnhancedHammer' (multiple sources found)
    Failed to load plugin 'MyExtUniversal' (multiple sources found)
    Failed to load plugin 'AutoGrades' (multiple sources found)
    Failed to load plugin 'CopyPaste' (multiple sources found)
    Failed to load plugin 'EnhancedHammer' (multiple sources found)
    Failed to load plugin 'MyExtUniversal' (multiple sources found)
    [7.7s] Spawning World
    [0.5s] Wire Meshes
    [0.7s] Procedural Generation
     
  12. Wulf

    Wulf Community Admin

    Nothing changed with plugin handling or detection, so not sure why you'd see that. Here's another DLL to test though, as I missed something in the previous:
     

    Attached Files:

  13. Seems like same results.
    Code:
    Server Config Loaded
    Manifest Assets Loaded
            83 skinnable objects
    Generating terrain of size 2048 with seed 626785942
    Loading Oxide Core v2.0.3600...
    Loading extensions...
    Latest compiler MD5: 5fbca0bf39b1c09ddf2fb3686b869242
    Local compiler MD5: 5fbca0bf39b1c09ddf2fb3686b869242
    Loaded extension CSharp v2.0.3600 by Oxide and Contributors
    Latest compiler MD5: 5fbca0bf39b1c09ddf2fb3686b869242
    Local compiler MD5: 5fbca0bf39b1c09ddf2fb3686b869242
    Loaded extension CSharp v2.0.0 by Oxide and Contributors
    Loaded extension MyExt v1.0.0 by Kolyma
    Loaded extension MySql v2.0.3600 by Oxide and Contributors
    Loaded extension Rust v2.0.3600 by Oxide and Contributors
    Loaded extension SQLite v2.0.3600 by Oxide and Contributors
    Loaded extension Unity v2.0.3600 by Oxide and Contributors
    Using Covalence provider for game 'Rust'
    Loading plugins...
    Loaded plugin Rust v2.0.3600 by Oxide and Contributors
    Loaded plugin Unity v2.0.3600 by Oxide and Contributors
    Failed to load plugin 'AutoGrades' (multiple sources found)
    Failed to load plugin 'CopyPaste' (multiple sources found)
    Failed to load plugin 'EnhancedHammer' (multiple sources found)
    Failed to load plugin 'MyExtUniversal' (multiple sources found)
    Failed to load plugin 'AutoGrades' (multiple sources found)
    Failed to load plugin 'CopyPaste' (multiple sources found)
    Failed to load plugin 'EnhancedHammer' (multiple sources found)
    Failed to load plugin 'MyExtUniversal' (multiple sources found)
    Let me wipe & reinstall this server real quick to confirm a clean install does the same
     
  14. Wulf

    Wulf Community Admin

    Hmm, odd. I'm not seeing any plugin loading issues. Do you have copies of those plugins under oxide/plugins by mistake?
     
  15. yes, the plugins are in \rustds\oxide\plugins . I thought that's where they were kept now after being moved out of the server instance-specific folders
     
  16. Wulf

    Wulf Community Admin

    Yeah, that's the default location now, not sure why it'd be seeing duplicates though.
     
  17. Gimme a couple of minutes and I'll have a blank server with released oxidemod on it and I'll test your test dll again. Thanks for helping.
    [DOUBLEPOST=1508565688][/DOUBLEPOST]OK, clean install server DOES load the MyExt extension WITHOUT using your custom dll posted here, so that's a big WTF on my end. Guess then endless series of patches on that server install had something messed up. I should have tried clean install earlier, but when I first noticed it, I had already seen the same problem on 2 other test and 1 production server.

    UPDATE:
    So I've confirmed twice, with a clean install and released version of OxideMod, my extension does load, and all the other plugins load without error or "multiple" messages. But I still get:
    Code:
    Ignored unnecessary '// Reference: Oxide.Ext.MyExt' in plugin 'MyExtUniversal'
    Error while compiling: MyExtUniversal.cs(20,17): error CS0246: The type or names
    pace name `MyExt' could not be found. Are you missing an assembly reference?
    UPDATE2:
    I went back to figure out last OxideMod version that works..... 2.0.3591 anything newer than that causes this error for me. Guess I'll continue chasing this problem tomorrow.
     
    Last edited by a moderator: Oct 21, 2017
  18. Oxide is ignoring more references than it should right now.

    > oxide.version
    Protocol: 2024.152.1
    Build Date: 10/19/2017 19:16:01
    Unity Version: 2017.1.2f1
    Changeset: 23417
    Branch: main
    Oxide Version: 2.0.3600

    Ignored unnecessary '// Reference: Oxide.MySql' in plugin 'AutoDoors'
    Ignored unnecessary '// Reference: Oxide.Core.MySql' in plugin 'AutoDoors'
    Error while compiling: AutoDoors.cs(20,37): error CS0234: The type or namespace name `MySql' does not exist in the namespace `Oxide.Core'. Are you missing an assembly reference?


    > oxide.version
    Protocol: 2024.152.1
    Build Date: 10/19/2017 19:16:01
    Unity Version: 2017.1.2f1
    Changeset: 23417
    Branch: main
    Oxide Version: 2.0.3596

    Ignored unnecessary '// Reference: Oxide.MySql' in plugin 'AutoDoors'
    Ignored unnecessary '// Reference: Oxide.Core.MySql' in plugin 'AutoDoors'
    Error while compiling: AutoDoors.cs(20,37): error CS0234: The type or namespace name `MySql' does not exist in the namespace `Oxide.Core'. Are you missing an assembly reference?


    > oxide.version
    Protocol: 2024.152.1
    Build Date: 10/19/2017 19:16:01
    Unity Version: 2017.1.2f1
    Changeset: 23417
    Branch: main
    Oxide Version: 2.0.3591

    Compiles on this version


    The takeaway here is that both references (Oxide.Core.MySql and Oxide.MySql) are ignored in later versions.
     
  19. Wulf

    Wulf Community Admin

    Those references are supposed to be made by default, they aren't being ignored for no reason. If there is an issue, then it needs to be fixed, but the // Reference for those is being ignored because they aren't something that should be needed.

    Also, AutoDoors does not use MySql.
     
  20. Mine does, custom rewrite too as the public one does not track/remove timers properly once a door is closed then re-opened (as seen on the Rusty servers, haven't bothered to check other servers). Plugin fails to compile using MySql with most recent build.

    Using/References
    Code:
    // Reference: Oxide.MySql
    // Reference: Oxide.Core.MySql
    using System;
    using System.Collections.Generic;
    using Oxide.Core;          //Access to Interface class
    using Oxide.Core.Database; //Access to Connection class
    
    Inside of the plugin
    Code:
    private readonly Oxide.Core.MySql.Libraries.MySql _MySql = Interface.Oxide.GetLibrary<Oxide.Core.MySql.Libraries.MySql>();
    internal Connection _Connection;
    
    Error snippets
    Code:
    Loaded plugin Unity v2.0.3600 by Oxide and Contributors
    Ignored unnecessary '// Reference: Oxide.MySql' in plugin 'AutoDoors'
    Ignored unnecessary '// Reference: Oxide.Core.MySql' in plugin 'AutoDoors'Error while compiling: AutoDoors.cs(20,37): error CS0234: The type or namespace name `MySql' does not exist in the namespace `Oxide.Core'. Are you missing an assembly reference?