Are you sure you had the correct chip selected? I see a 16F1937 selected but that chip does not have ANSEL register.

It has ANSELA, ANSELB and ANSELE.

So the error message was correct!

Ioannis