In Expression Blend 4, while compiling I get an error saying
The specified solution configuration “Debug|BNB” is invalid. Please specify a valid solution
If still not work try to specify configuration and platform
for example
msbuild testproject.sln /p:Configuration=Debug /p:Platform="Any CPU"
This works for me.