This is a long shoot but I have run out of own ideas.
Recently my TeamCity builds have started to throw this error upon me:
File.cs(Row, Col): error CS0411: The type arguments for method 'System.Linq.Enumerable.Select(System.Collections.Generic.IEnumerable, System.Func)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
But there are no errors in my code (or project configuration).
It compiles just fine if I do it either from withing Visual Studio (2010) itself or using MSBuild just as the build agent would do. (Even on the build machine.)
Just for reference, the code looks something like this:
public ISet<Task> Tasks {get; set;}
public IEnumerable<GradedTask> FindGradedTasks(){
return Tasks.Select(GetResult).Where(t=>t.HasResult).ToList(); // error
}
public GradedTask GetResult(Task task) {
return new GradedTask(this, task);
}
Anyone seen anything like this before? What might be causing this behaviour?