roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
741 stars 111 forks source link

System.Exception: Unable to find plugin in assembly #371

Closed barlap closed 5 months ago

barlap commented 5 months ago

Hello, I was using a plugin for name checker plugin but since I updated to the last cssharp version I get this error in the console: From what I read I saw that is something related to null checks I tried to add multiple null checks but seems to be something related to cssharp itself.

System.Exception: Unable to find plugin in assembly at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 131 at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.LoadPlugin(String path) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 125 at CounterStrikeSharp.API.Core.Plugin.Host.PluginManager.Load() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/Host/PluginManager.cs:line 93

error

barlap commented 5 months ago

Fixed, Looks like the original author didn't declared the class as public.