Line Integral gives no work done?

Your error is in the second integral. Along the path from $(0, 0)$ to $(1, 0)$ we can take as parameterization $x= t$ (from $0$ to $1$), $y= 0$ for all $t$. So $F(x,y)= \langle-y, x\rangle= \langle 0,t \rangle$ and the vector differential is $\langle dt, 0 \rangle$ so the integral is $$\int_0^1 \langle 0, t \rangle \cdot \langle dt, 0 \rangle = \int_0^t 0= 0$$ That is what you correctly have.

Along the path from $(1, 0)$ to $(1, 1)$ we can take as parameterization $x= 1$ for all $t$, $y= t$ (from $0$ to $1$). So $F(x,y)= \langle -y, x \rangle= \langle -t, 1 \rangle$ (not $\langle-t, 0 \rangle $ because $x= 1$) and the vector differential is $\langle 0, dy \rangle$ so the integral is $$\int_0^1 \langle -t, 1 \rangle \cdot \langle 0, dy \rangle = \int_0^1 dy= 1$$

So the complete integral is 1. Again, your error is that on the second line, from $(1, 0)$ to $(1, 1)$ as $x$ is always $1$, not $0$.


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.$$


Your second integral is wrong. Note that $x=1$ on this portion of the path.