Why is the trace of the Casimir on the irrep of a semisimple algebra nonzero? A crucial step in the "purely algebraic" proof of Weyl's semisimplicity theorem is that the Casimir element $C\in U\mathfrak{g}$ acts by nonzero scalars on a nontrivial irrep $V$. However, at least two sources I have consulted assert that $\text{tr}_V(C)=\text{tr}(C)=\dim \mathfrak{g}$, i.e. using the fact that $C$ can be written as a sum of products dual basis elements and then asserting that the trace pairing on the irrep is the same as the Killing form. But this seems obviously false. Or at least, I don't see why it should be true.
What I can see is that if $\mathfrak{g}$ is simple, the trace pairing on the irrep is a scaling of the Killing form, so by picking a suitable basis, we get that the trace pairing on $V$ is a scaling of the sum of the Killing forms on the simple summands of semisimple $\mathfrak{g}$, so you get a linear combination of the dimensions of the simple summands. But this could very well be zero.
 A: I can't comment on your sources; if they claim, they get $\mathrm{dim}\,\mathfrak{g}$, then that is, indeed wildly false.  For example, in $\mathfrak{sl}_2$, the representation with highest weight $n$ has Casimir eigenvalue proportional to $n(n-2)$ (let me not try to get the normalization right).
However, it's easy to see that the eigenvalue is non-zero: rather than consider the Casimir with respect to the the Killing form, consider the one constructed a dual basis according to the trace pairing of the representation $V$.  This acts on a simple $V$ with eigenvalue $1$; if the algebra is simple, then we immediately see this has to be a non-zero multiple of the usual Casimir.  The proof of semi-simplicity along these lines is written in Section 6.2-3 of "Introduction to Lie Algebras and Representation Theory" by @JimHumphreys.
A: The Casimir operator lies in the center of the universal enveloping algebra of $\mathfrak{g}$. By Schur's lemma, it must act by a scalar multiple of identity on any irreducible representation. For a highest weight representation you can actually directly compute this scalar by considering action of the Casimir on the highest weight vector. The result is $\|\lambda + \rho\|^2 - \|\rho\|^2$, where $\lambda$ is the highest weight, $\rho$ is half the sum of positive roots and the norm is taken with respect to the Killing form. This is fairly standard material that can be found in many textbooks. See e.g. Peter Woit's notes on BRST.
