27
votes

Suddenly when I opened by Visual Studio 2008 solution today and tried to rebuild all, I got the following error:

The "Message" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "D:\WINDOWS\Microsoft.NET\Framework\v3.5" directory

I don't understand anything of this. Can you please guide.

3
There should be configuration properties of visual studio, you can check the checkbox next the project you build. Maybe this can helpYagiz Ozturk
They are MsBuild errors, something is wrong in a .SLN or .CSPROJ file.Henk Holterman
I've found that just cleaning the solution/project and then rebuilding makes it go away. Still... sucks though.Michael K. Campbell

3 Answers

44
votes

I restarted my computer and the error disappeared :)

Updated:

Based on the below comments (Thanks to @Thomas & @Vikram), it seems that restarting Visual Studio also fixes the issue.

2
votes

I had the same problem in VS 2013 and fixed it by cleaning the solution.

1
votes

Just right click on the offending project and select "Clean". It's a bit faster than restarting VS. I still don't know what is causing this issue for me but that fixes it so that I can build the project.