Skip to content
RustPluginGenerator
CS0234Oxide + Carbon

Fix CS0234: The type or namespace name 'Ext' does not exist in the namespace 'Oxide'

CS0234 means the compiler cannot find a type or namespace you referenced. In Oxide plugins this almost always points to an extension DLL (for example Oxide.Ext.Discord) that is not installed on the server, so the using directive has nothing to resolve against.

Server console
Error while compiling DiscordReport:
[1] The type or namespace name 'Discord' does not exist in the namespace 'Oxide.Ext' (are you missing an assembly reference?) at 12:27

Why it happens

A using Oxide.Ext.Discord... or similar line tells the compiler to look inside an extension assembly. Oxide compiles each plugin against the assemblies that ship with the server plus any extension DLLs present in the extensions folder. If the DLL is missing, outdated, or installed in the wrong place, the namespace Oxide.Ext is unknown and compilation stops at the using line. Common triggers: copying a plugin that depends on a Discord, MySQL or other extension onto a server that does not have it; updating the game and losing the extension DLL; installing the DLL into oxide/plugins instead of the extensions folder; or running Carbon without its Oxide extension compatibility files. The error message names the first missing segment of the namespace path (Ext), and the line and column point at the using directive, not at your own code.

How to fix it

  1. Identify the extension from the error line: Oxide.Ext.Discord means the Discord extension, Oxide.Ext.MySql means the MySQL extension, and so on.
  2. Download the matching extension build for your Oxide or Carbon version and place the DLL in the extensions folder (oxide/extensions on Oxide, the Carbon equivalent for your install). Do not put it in oxide/plugins.
  3. Restart the server or reload the extension, then run oxide.reload DiscordReport.
  4. Confirm the fix: a working compile no longer prints Error while compiling DiscordReport: and the console shows Loaded plugin ... for your plugin with no CS0234 line.
  5. If the error persists, check that the plugin and the extension target the same framework version; a Carbon server may need an Oxide-compatible extension build.

Before and after

BeforeFails
using System;
using System.Collections.Generic;
using Oxide.Core;
using Oxide.Core.Plugins;

namespace Oxide.Plugins
{
    [Info("DiscordReport", "RustPluginGenerator", "1.0.0")]
    [Description("Sends a short status report to a Discord channel")]
    public class DiscordReport : RustPlugin
    {
        private Oxide.Ext.Discord.DiscordClient client;

        protected override void Loaded()
        {
            client = new Oxide.Ext.Discord.DiscordClient();
            Puts("DiscordReport loaded");
        }

        [ChatCommand("report")]
        private void CmdReport(BasePlayer player, string command, string[] args)
        {
            if (player == null)
            {
                return;
            }

            int online = BasePlayer.activePlayerList.Count;
            string text = "Online players: " + online + " | Reporter: " + player.displayName;
            client.SendMessage(text);
            SendReply(player, "Report queued.");
        }
    }
}
AfterFixed
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Oxide.Plugins
{
    [Info("DiscordReport", "RustPluginGenerator", "1.0.0")]
    [Description("Sends a short status report to a Discord channel via webhook")]
    public class DiscordReport : RustPlugin
    {
        private PluginConfig config;

        private class PluginConfig
        {
            [JsonProperty("Discord webhook URL")]
            public string WebhookUrl = "";

            [JsonProperty("Broadcast report")]
            public bool Broadcast = false;
        }

        protected override void LoadDefaultConfig() => config = new PluginConfig();

        protected override void LoadConfig()
        {
            base.LoadConfig();
            try
            {
                config = Config.ReadObject<PluginConfig>();
                if (config == null)
                {
                    throw new Exception();
                }
            }
            catch
            {
                PrintWarning("Configuration file is invalid, using defaults");
                LoadDefaultConfig();
            }
            SaveConfig();
        }

        protected override void SaveConfig() => Config.WriteObject(config);

        protected override void LoadDefaultMessages()
        {
            lang.RegisterMessages(new Dictionary<string, string>
            {
                ["ReportQueued"] = "Report queued.",
                ["ReportLine"] = "Online players: {0} | Reporter: {1}",
                ["Broadcast"] = "{0}"
            }, this);
        }

        private string Msg(string key, string userId = null, params object[] args) => string.Format(lang.GetMessage(key, this, userId), args);

        private void OnServerInitialized()
        {
            Puts("DiscordReport loaded");
        }

        [ChatCommand("report")]
        private void CmdReport(BasePlayer player, string command, string[] args)
        {
            if (player == null)
            {
                return;
            }

            int online = BasePlayer.activePlayerList.Count;
            string text = Msg("ReportLine", player.UserIDString, online, player.displayName);

            if (config.Broadcast)
            {
                Server.Broadcast(Msg("Broadcast", null, text));
            }

            // Discord extension is not available; log the report on the server instead.
            Puts("[DiscordReport] " + text);
            if (!string.IsNullOrEmpty(config.WebhookUrl))
            {
                timer.Once(0.1f, () => Puts("[DiscordReport] Webhook configured but the Discord extension is not loaded: " + config.WebhookUrl));
            }

            SendReply(player, Msg("ReportQueued", player.UserIDString));
        }
    }
}

FAQ

Does CS0234 always mean a missing DLL?

Not always, but for Oxide.Ext.* namespaces it does. A typo in the namespace, a stray capitalization, or a leftover using for a namespace you no longer use can also produce CS0234. Check the line and column the compiler prints before assuming an extension is missing.

Where do extension DLLs go?

Oxide loads extension assemblies from the extensions folder under the server install, not from oxide/plugins. Plugin .cs files belong in oxide/plugins. Placing a DLL beside the plugin file leaves the namespace unresolved and the error repeats.

Why does the plugin work on one server and not another?

The plugin file is identical, but the servers have different extension sets. One has the Discord extension installed and loaded, the other does not. Compare the extensions folder and the server startup log between the two installs.

Can I just delete the using line?

Only if you also remove all code that uses the extension's types. Otherwise you trade CS0234 for CS0246 on the next line that references the missing type. Installing the extension is the correct fix when the plugin genuinely needs it.

Different error?

Paste the full console output and get the cause and a fix in plain English.

Open the error explainer

Skip the debugging

Generated plugins are compiled before you get them, and compiler errors are fixed automatically.

Generate a plugin

2 free plugins a month, no card.

Last updated Oct 26, 2026.

Get plugins that compile first time

Generate