I found that eating according to ALL suggestions, including exercise would help to drop weight. Sorry to say I do not adhere to either. I see focusing on beneficial foods as for dropping weight, or at least stay the same.
The diet can work either way. To drop weight however moving more is most helpful.
In Swami (computer calculated) it is interesting to see how things change if one inputs eating larger or smaller portions. But the BTD books also contain lower and upper limits if you do the calculations.
To gain weight, sometimes it is more about foods that are more neutral, rather than beneficials. Neutrals might build 'additional' calories.
Depending on 'why' there is a need to gain weight, I would add calorie-dense foods rather than watery foods // beans rather than salad.
If it is for a belly, intestines that have suffered from illness then I would use soothing foods. The idea being= the less the body has to work to digest, the more strength it can use to absorb and gain strength. .... and then start moving more .. mom was ill a long time, but she used any time to exercise. She used her cane by balancing it on her arms, fingers or knees, ankles, and built herself up, even while lying down.