Question: Every time I start Visual Studio 2008, the first time I try to run the project I get the error CS0006 The metadata file ... could not be found. If I do a rebuild of the complete solution it works.

Some information about the solution:

* I'm building in debug mode and Visual Studio complains about not finding dll:s in the release folder.
* The projects Visual Studio complains about are used by many other projects in the solution.
* I have changed the default output path of all projects to a ......\build\debug\ProjectName and ......\build\release\ProjectName respectively. (Just to get all build files in one directory)
* I have the same problem with a another solution.
* The solution was created from scratch.
* There are 9 projects in the solution. One WPF and 8 class libraries using dotnet 3.5.

Any ideas on what is causing this problem?

Answer: 
First make sure that the "build" check box is marked in Build -> Configuration Manager for each project.

In case, if you already have all projects selected under Build -> Configuration Manager menu, 
and restarting VS trick doesn't work for you either than you have to find the reference of the file(s) (could be dll or cs) in your project and delete those references manually. Those file(s)/reference(s) should be displayed with yellow icon. The error definitely guides you which project of solution you should be looking into. 

The reason of this error is because you have deleted file(s) manually in windows explorer and VS hasn't updated the reference and trying to locate the file which doesn't exist anymore!
I had this error it was caused by one of my project dependencies where the assembly name had been changed in the project, but the reference was not updated. So updating the reference or renaming the assembly back will fix it.