I had the same issue, how I resolved it:
Ran msbuild.exe <my.sln> /t:<mytargetproject>
from a VS2010 command prompt, where <my.sln>
is your solution name and <mytargetproject>
is the project you are trying to build. For e.g. msbuild.exe helloworld.sln /t:mainproj
.
When you do this or at least when I ran this, a dialog box popped up and said "foo.dll" cannot be found, I added the path of that dll to my "PATH" environment variable and the problem was solved! See ChrisF's comment to the question, as it says, the error is that some dll/component is missing.
From the dll name it complained about, I believe this is not contained to VS2010 libs/dlls, for me it was a third-party dll (which I am using and supposed to be available during the build) it was complaining about.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…