(If you want a quick fix - scroll to the bottom. Otherwise enjoy)
After what happened with me and an MSBuild error last night I did seriously think about jacking it all in and move to Australia to become a sheep farmer...
I have been busy the last few days putting the finishing touches to an application for a client and it was all going well until I changed the capitalization of the name of the application.
When I came to build the setup project it failed... Huh? It's fine, all I have done is change a letter of it's name!
So I tried again, you know "try, try again"... Nope... Hmmm, what's the error... Unspecified! Great...
Went back to the project, ReBuild... Failed... Arrrhhh, but this time a real error...
'The "GenerateResource" task failed unexpectedly.'.....
OK, so double click the error, (I do love that little touch, thanks guys, just SO makes sence)... But O no... It's a resource error thing... No I will not jump to the line!!! :@
Press F1 that'll help... Nope. "Sometimes MSBuild has" bla bla bla.... :@ Damn it... O but at least I know it's an MSBuild issue eh!
Quick www.live.com search and BOOM a post in MSDN comes up...
Fix
So to cut along post/story short, the fix is in the Project File - 
Open it up using your TextBased editor (Notepad will do) and place the following line:
<GenerateResourceNeverLockTypeAssemblies>true</GenerateResourceNeverLockTypeAssemblies>
just below the <PropertyGroup> tag, usually on the third line...
Save the file...
For good measure I'd close any instances of Visual Studio down. (you never know!)
That should do it... I've never been able to recreate it since I found it, so let's just hope we don't have it again shall we!!!
Hope it helps...
Anyone else had issues with this? Or have you got a bug that keep'd you up until it was time for a siesta IN NEW ZEALAND!!!