Error after upgrading to MSBuild Tools 2015: Could not load file or assembly Microsoft.Build.Utilities
After upgrading to TeamCity 9.1 and installing MSBuild Tools 2015 on all build agents, I get the following error:
MSBUILD : error MSB1021: Cannot create an instance of the logger. Could not load file or assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Full error log:
[10:50:43]Step 5/12: Rebuild (Visual Studio (sln)) (1s)
[10:50:43][Step 5/12] Starting: C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:D:\BuildAgent\work\141e4695a537320d "/msbuildPath:C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe"
[10:50:43][Step 5/12] in directory: D:\BuildAgent\work\141e4695a537320d
[10:50:44][Step 5/12] Process exited with code 1
[10:50:44][Step 5/12] MSBuild output
[10:50:44][MSBuild output] Start MSBuild...
[10:50:44][MSBuild output] 'C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe' '"@D:\BuildAgent\work\141e4695a537320d\Hoering.sln.teamcity.msbuild.tcargs" D:\BuildAgent\work\141e4695a537320d\Hoering.sln.teamcity'
[10:50:44][MSBuild output] working dir = 'D:\BuildAgent\work\141e4695a537320d'
[10:50:44][MSBuild output] Microsoft (R) Build Engine version 14.0.23107.0
[10:50:44][MSBuild output] Copyright (C) Microsoft Corporation. All rights reserved.
[10:50:44][MSBuild output]
[10:50:44][MSBuild output] MSBUILD : error MSB1021: Cannot create an instance of the logger. Could not load file or assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
[10:50:44][MSBuild output] Switch: JetBrains.BuildServer.MSBuildLoggers.MSBuildLogger,C:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll
[10:50:44][Step 5/12] Step Rebuild (Visual Studio (sln)) failed
Seems like JetBrains.BuildServer.MSBuildLoggers.dll expects an old version of Microsoft.Build.Utilities?
Please sign in to leave a comment.
The workaround seems to be to install .NET 2 on all build agents. Shouldn't have been necessary though...
Hi Geir,
Here the known bug in 9.1: https://youtrack.jetbrains.com/issue/TW-41890. Please watch it, we are going to provide fix ASAP.
Sorry for the inconvenience.