1. Wulf

    Wulf Community Admin

    You'd need to remove the // Reference and add the using statement for Oxide.Core.MySql.
     
  2. Which would also require adding the Oxide.MySql.dll to the existing project's references. Wasn't aware that the intention was to move away from referencing the dll the old way at the top. Still failing to compile both on start and on reload.

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

    Has retrieving the MySql library changed too?
     
  3. Wulf

    Wulf Community Admin

    It was never intended to have to manually reference a core DLL with // Reference, just a bug. Grabbing the library has not changed. You may want to test the latest snapshot though, as I made changes per testing with the OP of this thread.
     
  4. Using the most recent release from 13 hours ago.
     
  5. Wulf

    Wulf Community Admin

    Snapshot from 30+ mins ago on AppVeyor.
     
  6. Loading Oxide Core v2.0.3601...

    Same issue
     
  7. Wulf

    Wulf Community Admin

    Did you add the using statement?
     
  8. Code:
    using System;
    using System.Collections.Generic;
    using Oxide.Core;          //Access to Interface class
    using Oxide.Core.MySql;    //Access to MySql Library
    using Oxide.Core.Database; //Access to Connection class
    
     
  9. Wulf

    Wulf Community Admin

    I can't reproduce the issue locally, could you upload your version of the plugin for me to test?
     
  10. Sent via PM
     
    Last edited by a moderator: Oct 21, 2017
  11. Wulf

    Wulf Community Admin

    Remove the //Access to MySql Library comment and it will compile. :p

    I'll adjust the regex for stuff like that.
     
  12. But... but... how will we comment our code :(
    [DOUBLEPOST=1508593703][/DOUBLEPOST]Compiling without issues now, thanks a bunch.
     
  13. Wulf

    Wulf Community Admin

    I'm adjusting the regex for it, so comments on them should work soon.
     
  14. So that AppVeyor, how long before you release an update is it generally available? I wouldn't mind running a test or two pre-release to help find these pesky issues before they become a bigger problem.
     
  15. Wulf

    Wulf Community Admin

    Unless it's a crucial issue, then we'll generally wait until there are a few more changes or at least a game update before doing a release.
     
  16. Ahh understood. I'll check in on Thursdays and see if anything is up.
     
  17. This line, which was changed after 2.0.3591 is the first (and only) thing that causes my problem when I use OxideMod version 2.0.3596

    Code:
    Extensions/Oxide.CSharp/Compilation.cs
    Code:
    var result = Regex.Replace(match.Groups[1].Value, @"Oxide\.[\w]+\.([\w]+)", "Oxide.$1");
     
  18. Wulf

    Wulf Community Admin

    And the problems would be what exactly?
     
  19. Same problem with original topic of this thread. At least I kind of know where to start looking. Something in the implementation of my extension is causing it to not qualify as a reference because of that line above

    Code:
    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?
     
  20. Wulf

    Wulf Community Admin

    The part you quoted is for handing adding extension references based on using statements. The code below basically looks for any "using X.X.X using statements, which then tries to find an extension by that name. If you have a varying namespace and DLL, then it may have an issue. The "Oxide." check in there is for our extensions, as we currently still have the Oxide.Core.X and Oxide.Game.X namespace, but Oxide.X for DLL names.
    Code:
                    // Include implicit references detected from using statements in script
                    match = Regex.Match(line, @"^\s*using\s+([\w]+\.(?:Core|Ext|Game)\.(?:[^\.]+))[^;]*;.*$", RegexOptions.IgnoreCase);
                    if (match.Success)
                    {
                        var result = match.Groups[1].Value;
                        if (result.StartsWith("Oxide.")) AddReference(plugin, Regex.Replace(result, @"Oxide\.[\w]+\.([\w]+)", "Oxide.$1"));
                        else AddReference(plugin, result);
                        continue;
                    }
    The only thing that has changed with that portion of code is that I removed the Oxide. specific check in the first matching line, and then added the Oxide. check later to handle our assembly name changes.

    So, if your extension doesn't have an X.X.X namespace and assembly DLL, then that's likely the cause. I could probably loosen that up a bit as I know there are some without X.X.X.