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?
Custom extension not loading after update
Discussion in 'Rust Development' started by Kolyma, Oct 21, 2017.
-
Wulf Community Admin
I'd need to see logs and details, I can't really help with no information.
-
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
-
Wulf Community Admin
What do your plugin's using statements look like? -
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(); }
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() { } } }
Code:namespace Oxide.Ext.MyExt.Libraries { public class MyExt : Library {
-
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.
-
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 {
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
-
Wulf Community Admin
-
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?
-
Wulf Community Admin
Edit: Going to post another version in a sec.Last edited: Oct 21, 2017 -
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
-
Wulf Community Admin
Attached Files:
-
-
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)
-
Wulf Community Admin
-
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
-
Wulf Community Admin
-
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?
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 -
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. -
Wulf Community Admin
Also, AutoDoors does not use MySql. -
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
Code:private readonly Oxide.Core.MySql.Libraries.MySql _MySql = Interface.Oxide.GetLibrary<Oxide.Core.MySql.Libraries.MySql>(); internal Connection _Connection;
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?