Problem: Let $X$ be a $R$-module. Prove that $X$ be a projective module if and only if $\text{Ext}^n (X,Y) = 0$ for all $R$-module $Y$ and for all $n \ge 1$.
My attempt: Suppose that $X$ be a projective module, then we have a projective resolution
$$K: \cdots \rightarrow K_{n+1} \rightarrow^{\partial_{n+1}} K_n \rightarrow^{\partial_n} K_{n-1} \rightarrow \cdots \rightarrow K_0 \rightarrow^{\partial_0} X \rightarrow 0$$
$K_n = 0$ for all $n \ge 1$, $K_0 = X$ and $\partial_0 = 0$ for all $n \ge 1$, $\partial_0$ is the trivial homomorphism of $X$. Then
$$\text{Ext}^n (X,Y) = H^n (\text{Hom}(\overline{K},Y)) = 0, \forall n \ge 1$$
My question: How to prove the inverse conclusion?
If $\operatorname{Ext}^n(X,Y)=0$ for all $Y$ and all $n\geq 1$, then certainly $\operatorname{Ext}^1(X,Y)=0$ for all $Y$. But then, if $$0\to A\to B\to C\to 0$$ is any short exact sequence of $R$-module, then the long exact sequence is $$\operatorname{Ext}^1(X,C)\to\operatorname{Hom}(X,A)\to\operatorname{Hom}(X,B)\to\operatorname{Hom}(X,C)\to 0$$ By assumption the first term is zero, this implies that the functor $\operatorname{Hom}(X,.)$ preserve short exact sequence, hence is exact, and so $X$ is projective.