2. Given $x+(1+x)^{2}+(1+x)^{3}+\cdots+(1+x)$ $=a_{0}+a_{1} x+a_{2} x^{2}+\cdots+a_{n} x^{n}$,
and $a_{0}+a_{2}+a_{3}+\cdots+a_{n-1}=60-\frac{n(n+1)}{2}$. Then the possible value of the positive integer $n$ is ( ).
(A) 7
(B) 6
(C) 5
(D) 4
2.C.

Let $x=1$, we get
$$
\begin{array}{l}
1+2^{2}+2^{3}+\cdots+2^{n} \\
=a_{0}+a_{1}+a_{2}+\cdots+a_{n}=2^{n+1}-3
\end{array}
$$

From $a_{1}$ being the coefficient of $x$, we know
$$
a_{1}=1+2+3+\cdots+n=\frac{n(n+1)}{2} \text {. }
$$

From $a_{n}$ being the coefficient of $x^{n}$, we know $a_{n}=\mathrm{C}_{n}^{n}=1$.
$$
\begin{array}{l}
\text { Hence } 60-\frac{n(n+1)}{2} \\
=a_{0}+a_{2}+a_{3}+\cdots+a_{n-1} \\
=2^{n+1}-3-1-\frac{n(n+1)}{2} .
\end{array}
$$

Thus, $2^{n+1}=64$. Solving for $n$ gives $n=5$.