Tanks - the processing queue is useful, missed it before.
Here is the exception:
[17:45:30.1262-BuildTask-11] ERROR (Internal): System.InvalidOperationException: Cannot modify an evaluated object originating in an imported file "...\Microsoft.Common.Before.targets".
Server stack trace:
at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(String resourceName, Object[] args)
at Microsoft.Build.Shared.ErrorUtilities.VerifyThrowInvalidOperation(Boolean condition, String resourceName, Object arg0)
at Microsoft.Build.Evaluation.Project.VerifyThrowInvalidOperationNotImported(ProjectRootElement otherXml)
at Microsoft.Build.Evaluation.Project.RemoveItemHelper(ProjectItem item)
at Microsoft.Build.Evaluation.Project.RemoveItem(ProjectItem item)
at nCrunch.VSIntegration2010.MSBuildIntegration.BuildableProject.RemoveItems(String itemName)
at nCrunch.Compiler.RemoteBuildRunner.Build(ComponentBuildParameters parameters)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
It seems to be related to a line in the .csproj
<Import Project="$(EnvironmentConfig)" />
where EnvironmentConfig is environment variable that points to shared config - all our projects start with this line.
If I avoid this line in NCrunch build, the build proceeds further (but fails with another error - now reported in Tests Window).