Problem
Our global Jenkins continuous integration server throws this error during compile step. My local TeamCity continuous integration server runs fine. What is the difference.
Background
I integrate some static code analysis steps via MSBuild-targets in the csproj files.
To allow a fast developing without a code analysis for ever compiling I bound these targets only to RELEASE-configuration.
With the MSBuild element <ImportGroup> only one condition must be specified. So my construct was:
<ImportGroup Condition="'$(Configuration)'=='Release'">
<Import Project="..\..\..\tools\Fxcop\EsriDE.FxCop.targets" />
<Import Project="..\..\..\tools\StyleCop\StyleCop.targets" />
</ImportGroup>
That works fine in Visual Studio and TeamCity.
But Jenkins allows to specify the MSBuild version:

Because my target framework is .NET 3.5 I decide to choose the entry .NETv3.5-x86.
And this was the failure. The MSBuild element <ImportGroup> is new in .NET 4.0
Solution
With the following options everything runs fine:

BTW: Maybe that some combinations of MSBuild version and toolsversion switch could also fix this error.