CoreResGen error when building .NET 4.0 project with TeamCity 5.1.2

Hi,

I am getting the following error when building a solution using the VS2010 build runner:

"E:\TeamCity\buildAgent\work\1d1d77df90291324\FrameworkLibraries\OZCAP.Common.Practices\OZCAP.Common.Practices.csproj"  (default target) (4:2) ->

[17:29:02]: (CoreResGen  target) ->
[17:29:02]: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):  error MSB4018: The "GenerateResource" task failed unexpectedly.  [E:\TeamCity\buildAgent\work\1d1d77df90291324\FrameworkLibraries\OZCAP.Common.Practices\OZCAP.Common.Practices.csproj]
[17:29:02]: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):  error MSB4018: System.TypeLoadException: Could not load type  'Microsoft.Build.Utilities.ExecutableType' from assembly  'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral,  PublicKeyToken=b03f5f7f11d50a3a' due to value type mismatch.  [E:\TeamCity\buildAgent\work\1d1d77df90291324\FrameworkLibraries\OZCAP.Common.Practices\OZCAP.Common.Practices.csproj]
[17:29:02]: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):  error MSB4018:    at Microsoft.Build.Tasks.GenerateResource.Execute()  [E:\TeamCity\buildAgent\work\1d1d77df90291324\FrameworkLibraries\OZCAP.Common.Practices\OZCAP.Common.Practices.csproj]
[17:29:02]: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):  error MSB4018:    at  Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()   [E:\TeamCity\buildAgent\work\1d1d77df90291324\FrameworkLibraries\OZCAP.Common.Practices\OZCAP.Common.Practices.csproj]
[17:29:02]: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):  error MSB4018:    at  Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost  taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost  taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask,  Boolean& taskResult)  [E:\TeamCity\buildAgent\work\1d1d77df90291324\FrameworkLibraries\OZCAP.Common.Practices\OZCAP.Common.Practices.csproj]


This is a .NET 4.0 project and it builds fine on the command line via MSBUILD.  Any ideas would could be wrong?




Thanks,
David
1 comment

This issue has been resolved by doing a repair on the .NET 4.0 Framework.

0

Please sign in to leave a comment.