Occasionally, I get build errors after checking my changes to TFS, because the TFS compiler does not support newer syntax like:
auto property initializers
public int X { get; set; } = x;
?. and ?[] null-conditional Operators
int? count = customers?[0]?.Orders?.Count();
The visual studio 2015 compiler does not detect these problems (the project compiles fine), which means that after the build error occurs I usually have to do another checking to remove the invalid syntax from the solution.
Is it possible to change the VS2015 solution somehow, so that these errors are caught before I do the checking to TFS?