Here is the code. This is ready for usage.
class AssemblyInfo(GhPython.Assemblies.PythonAssemblyInfo):
def __init__(self):
#use your icon here
icon_text = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAAMSURBVBhXY/j//z8ABf4C/qc1gYQAAAAASUVORK5CYII="
icon = System.Drawing.Bitmap(System.IO.MemoryStream(System.Convert.FromBase64String(icon_text)))
Grasshopper.Instances.ComponentServer.AddCategoryIcon("IWantAnIconAddon", );
Grasshopper.Instances.ComponentServer.AddCategorySymbolName("IWantAnIconAddon", 'I');
#... keep the rest here