Just clean the solution and rebuild.
Just dont have any idea why the above error happened this morning when I tried to add some code to a windows service and tried to build the solution.But it has a simple resolution,just clean the solution. 🙂 [Solution Explorer > Right click on the Solution> Select "Clean Solution"].