What have I done wrong? I downloded the github solution then refrenced the rust project and core project but i still get errors.
Code:Severity Code Description Project File Line Suppression State Error CS0012 The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. RustPlugin C:\Users\Nakruf\Desktop\Oxide-develop\RustPlugin\Class1.cs 7 Active
Code:using System; using System.Collections.Generic; using Oxide.Core.Libraries.Covalence;namespace Oxide.Plugins { [Info("EpicStuff", "Unknown", 0.1)] [Description("Makes epic stuff happen")] class EpicStuff : RustPlugin { // The rest of the code and magic } }
Solved The type 'Attribute' is defined in an assembly that is not referenced
Discussion in 'Rust Development' started by Nakruf, Jun 3, 2017.
-
Wulf Community Admin
If you are seeing that error in your IDE, then you need to reference Oxide.Core.CSharp.dll.
-
I have done that, yet I still get it.
Last edited by a moderator: Jun 4, 2017 -
Wulf Community Admin
-
As mentioned in the error list on the bottom of your screenshot, a reference to mscorlib 2.0.0.0 is missing. Make sure that the RustPlugin project you added is of the type `Class Library (.NET Framework)` targeting .NET Framework 3.5.
-
@Nakruf
Note: I personally develop plugin code in same folder as the Rust SamplePlugin.cs file ---> Games/Unity/Oxide.Game.Rust/Plugins/
1. If you open SamplePlugin.cs in Games/Unity/Oxide.Game.Rust/Plugins/SamplePlugin.cs - Does it have any errors?
2. With your new RustPlugin project that you created, underneath the project check if >References (and their Path - Properties) are the same as Games/Unity/Oxide.Game.Rust (Rust) project >References (and their Path - Properties)