We use an on-premises build server (32-bit Windows 7; note: updating the machine is not an option) with Azure. The server automatically updated its version of VS 2017 to 15.9.30. After this update, most of our builds are now failing. The error messages vary somewhat, but they all have a similar pattern that seems to be related to MSBuild and/or NuGet. For example:
- Error MSB4019: The imported project "C:\Program Files\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found
- Error MSB4036: The "GetReferenceNearestTargetFrameworkTask" task was not found
- Error MSB6003: The specified task executable "csc.exe" could not be run. Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=1.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies
Attempted fixes:
- Builds were working before the update
- Confirmed the offending files are actually missing. In some cases, parts of the path mentioned in the error message was not present on the build server
- Although this seems like the wrong way to fix the problem, we copied the missing files to the appropriate locations on the build server. This seemed to fix a couple of the bad references, but some of the errors still persisted even when the correct file was provided
- Confirmed that the "Nuget package manager" and the "Nuget targets and build tasks" components were installed through VS
- Cleared the NuGet cache using the 'Tools | Options...' menu item in VS
Out of ideas at this point. Any suggestions/insights are welcomed. TIA.