Visual interface of vs 2017 marks code in red as if they were in error (when in fact they are not) even performing the build successfully.
BuildResult:
I have already restarted vs and windows and the problem continues.
I deleted the .suo file from the solution and it worked again.
Source: link