The SqlProcedureAttribute is defined in
System.Data which should already be referenced by your code. It isn't defined in SMO and that assembly isn't needed unless you're trying to work with SMO for other reasons.
[SqlProcedure(Name = "MySproc")]
public static void MySproc ()
Based upon your solution explorer screenshot it looks like you might be trying to create a .NET 5/6 project for your code. Note that you won't be able to do that for SQL CLR. SQL CLR relies on the version of .NET that ships with SQL which is currently .NET Framework. Therefore you need to ensure that your code is compiling with a target framework of .NET 4.5 to 4.8, depending upon what version is actually installed on your SQL machine with 4.7.2 being the most common. Otherwise the code won't run.