Calculate:$\int _{|z|=1}\text{Re z dz}$. For a positively oriented unit  circle 

Calculate:$\int _{|z|=1}\text{Re z dz}$.

If $z=x+iy\implies \text{Re z}=x$
So $\int _{|z|=1}\text{Re z dz}=\int_{|z|=1} x d(x+iy)=\int _{|z|=1}x dx$.(as dy=0)
$=\frac{x^2}{2}|_0^{2\pi }=2\pi^2$
But the answer is not matching.It is given as $\pi i$.
Where am I wrong ?Please help.

I thought it might be useful to present a "brute force way forward."  Proceeding, we have
$$\begin{align}
\oint_{|z|=1}\text{Re}(z)\,dz&=\color{blue}{\oint_{\sqrt{x^2+y^2}=1}x\,dx}+\color{red}{i\oint_{\sqrt{x^2+y^2}=1}x\,dy}\\\\
&=\color{blue}{\int_{1}^{-1} x\,dx+\int_{-1}^1x\,dx}+\color{red}{i\underbrace{\int_{-1}^1\sqrt{1-y^2}\,dy}_{=2\int_0^1\sqrt{1-y^2}\,dy}+i\underbrace{\int_1^{-1}\left(-\sqrt{1-y^2}\right)\,dy}_{=2\int_0^1\sqrt{1-y^2}\,dy}}\\\\
&=\color{blue}{0}+\color{red}{i4\underbrace{\int_0^1\sqrt{1-y^2}\,dy}_{=\pi/4\cdots\text{area of quarter circle}}}\\\\
&=i\pi
\end{align}$$
as expected.
