Gaining weight and muscle, for the vast majority of people, including ectomorphs, is straightforward. Hop on a linear periodization program that utilizes heavy compound lifts, eat in a caloric surplus, and give your body adequate recovery. That's it.