VS2010 compiles solution without errors, msbuild fails: "fatal error CS0002: Unable to load message string from resources"

Posted by Nathan Ridley on Stack Overflow See other posts from Stack Overflow or by Nathan Ridley
Published on 2012-03-24T15:40:51Z Indexed on 2012/03/24 23:29 UTC
Read the original article Hit count: 489

I'm having a lot of trouble trying to track down the cause of this error message. I have a large Visual Studio 2010 solution which compiles without error on my local machine but on the build server, msbuild fails on one of the projects with the error:

fatal error CS0002: Unable to load message string from resources

Here's the red error section at the end:

Build FAILED.

"C:\TeamCity\buildAgent\work\85eff164854b9e67\Libraries\Domainface.Proxy.Common\Domainface.Proxy.Common.csproj" (default target) (9) ->
(CoreCompile target) -> 
  CSC : fatal error CS0002: Unable to load message string from resources. [C:\TeamCity\buildAgent\work\85eff164854b9e67\Libraries\Domainface.Proxy.Common\Domainface.Proxy.Common.csproj]

    0 Warning(s)
    1 Error(s)

The entire msbuild output from the build server is here: http://pastie.org/3660842

What does the error generally refer to, that would cause it to build locally but not on the build server?

UPDATE

I have just run msbuild /version on both machines and it turns out the .net framework versions are very slightly different. Local machine is 4.0.30319.488 and build server is 4.0.30319.1. I'm about to run windows update on the server to allow it to install some updates, as several seem to be .net framework-related, so I'll see if that makes a difference.

UPDATE

Installing the updates didn't help. Just remembered I copied up csc.exe from the async preview a little while ago in order to facilitate async compilation (the actual async preview had failed to install on the server due to visual studio not being there, but installing visual studio team viewer seems to have fixed that, so i've just run the proper async ctp3 installer to see if that makes a difference.

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio-2010