I recently built a new TFS 2018 (update 3) server and added the Visual Studio Build Tools (v15.7.1). After creating a very simple C# project, the server build fails with Error MSB6006: "csc.exe" exited with code 1. I turned on debugging and discovered the error
Could not load file or assembly 'Microsoft.CodeAnalysis.CSharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (TaskId:32)
My project does not reference this library and I have Code Analysis turned off at the project level so I think this is an issue with the VS Build Tools. Does anyone know of a work-around or a way to fix this issue?
I also noticed a newer version of VS Build Tools (v15.8). I have not tried updating the build server yet because the high complexity of generating an offline package, zipping, uploading, etc. but will be my next effort if a short term fix cannot be found.
Basically, our new server is dead without a solution so I'm hoping someone has a answer here, otherwise, I may end up scrapping this all together for something more reliable.