Answer
$-2$
Work Step by Step
The vector field $F(x,y)=ai+bj$ is known as conservative field throughout the domain $D$, when we have
$\dfrac{\partial a}{\partial y}=\dfrac{\partial b}{\partial x}$
$a$ and $b$ represents the first-order partial derivatives on the domain $D$.
From the given problem, we get $\dfrac{\partial a}{\partial y}=\dfrac{\partial b}{\partial x}=\cos y$
Thus, we have the vector field $F$ is conservative.
Consider $f(x,y)=x \sin y+\cos y+ g(y) \implies f_y(x,y)=x \cos y-\sin y$
Thus, we have $f(x,y)=x \sin y+\cos y+ k$
Here, $k$ is constant.
Hence, $\int_C F \cdot dr =f(1,\pi)-f(2,0)=(0-1)-(0+1)=-1-1=-2$