I'm trying to compile the project on the TeamCity server and get the following error: enter image description here

I assume that TeamCity server does not support # 6 objects in my case. How can I fix this error?

  • Please edit the question and attach the code, not the picture. also attach the parameters of your agent (you can see it in the agent's settings) - Senior Pomidor
  • one
  • If you are given an exhaustive answer, mark it as correct (tick the selected answer). - andreycha

1 answer 1

The fact is that the Func<> types in .NET 3.5 were located in the System.Core assembly. And with .NET 4.0 they moved to mscorlib .

As you can see from the TimCity log, you have both System.Core version 3.5.0.0 and mscorlib version 4.0.0.0 connected at the same time. The problem can be solved in any direction: either both assemblies must be version 3.5 or 4.0.