Thursday, January 10, 2013

MSB1008: Only one project can be specified.

I kept getting tripped up by this error and couldn't figure out why until I realised that it was all about the NAME of the config. I had created a configuration called "Debug MOCKALL" in which I use mocks to replace stuff at debug time on an emulator and MSBuild refused to complete.

The problem is that MSBuild hates spaces and the command line generated had spaces due to the "Debug< >MOCKALL" with a space in it. MSBuild tries to create output directories and fails because it thinks there are two project names.

So. Renaming my config to "Debug_MOCKALL" fixed it.

Hope this helps it took me a while to figure out.

No comments: