Line Integral gives no work done? For the following question,

$$
\mathbf{F}=\langle-y, x\rangle
$$
For this field:
Compute the line integral along the path that goes from (0,0) to (1,1) by first going along the $x$ -axis to (1,0) and then going up one unit to (1,1) .

I got an answer of $0$, by doing:
But the answer key concludes that the answer is $1$:

To compute $\int_{C} \mathbf{F} \cdot d \mathbf{r}$ we break the curve into two pieces, then add the line integrals along each piece.
First, fix $y=0$ (so $d y=0$ ) and let $x$ range from 0 to 1 .
$$
\int_{x=0}^{x=1} \mathbf{F} \cdot d \mathbf{r}=\int_{x=0}^{x=1}-y d x+x d y=\int_{0}^{1} 0 d x=0
$$
Next, fix $x=1$ (so $d x=0$ ) and let $y$ range from 0 to 1:
$$
\int_{y=0}^{y=1} \mathbf{F} \cdot d \mathbf{r}=\int_{y=0}^{y=1}-y d x+1 d y=1
$$
We conclude that $\int_{C} \mathbf{F} \cdot d \mathbf{r}=1$

I understand the solution from the answer key, but I don't get why my solution doesn't work. Please assist.

Here's how physicists often do it:
$$\int_C \mathbf{F}\cdot d\mathbf{r} = \int_C (F_x \hat{i} + F_y \hat{y})\cdot (\hat{i}\,dx + \hat{j}\,dy) = \int_C F_x\,dx + F_y\,dy$$
On the first part $x$ goes $0 \to 1$ and $y=0$ is constant so $dy = 0$ and hence
$$\int_{C_1} F_x\,dx + F_y\,dy = \int_{x=0}^{x=1} -y\,dx = 0.$$
Similarly, on the second part $y$ goes $0 \to 1$ and $x=1$ is constant so $dx = 0$ and hence
$$\int_{C_2} F_x\,dx + F_y\,dy = \int_{y=0}^{y=1} x\,dy = \int_{y=0}^{y=1} dy=1.$$
