Building the Sukkah on Yom Tov and Chol Hamoed:
It is forbidden to build a Sukkah on Shabbos and Yom Tov due to the Biblical building prohibition.
Building a Sukkah on Chol Hamoed: One who did not build a Sukkah before the Holiday is to build his Sukkah on Chol Hamoed and dwell in it. This applies whether one did not build his Sukkah due to negligence or due to no fault of his own. This applies even at the end of the seventh day of Sukkas [i.e. Hoshana Rabbah], nevertheless he is obligated to build a Sukkah in order to dwell in the Sukkah for the remaining moments.
 M”B 637:1; See Meged Yehuda on 1 on Shut Magidos 109 that there is a debate in the Poskim as to whether the building prohibition is Biblical or Rabbinical on Yom Tov; See P”M 315 A”A 2 [Biblical]; Ateres Chachamim 6 and Beir Yitzchak 13 [Rabbinical]
 Admur 637:1; Michaber 637:1; Rambam Sukkah 6:15; Chachamim in Sukkah 27b; Taz 637:1; See Piskeiy Teshuvos 638:3
Other opinions in Talmud: Rebbe Eliezer is of the opinion that the Sukkah must be built before Sukkos, otherwise it is invalid. [See Sukkah ibid]
 The reason: Now, although the verse [Devarim 16:13] states that one is to build his Sukkah [to dwell in it] for seven days, the intent is not that one has to make a Sukkah that is fit to be dwelled in for seven days, and is hence coming to exclude building the Sukkah on Chol Hamoed being that there are no longer seven days remaining for one to dwell in it. Rather, the intent of the verse is that one is to build the Sukkah throughout any of the seven days. Thus, if one did not build it [before] the first day he is to build it on the second day. [Admur ibid] Likewise, one is not required to live within the Sukkah for seven days to fulfill the Mitzvah and rather even if he remains within the Sukkah for only part of the time, he fulfills the Mitzvah.