问题
On prem TFS 2018 Build fails - New .Net Core 2.1 MVC project. add this package PM: Install-Package System.DirectoryServices -Version 4.5.0 Use TFS 2018 Build Agent: Build Fails.
回答1:
After much research, the cproj file is hidden and you can only edit it via the menu in Visual Studio. Anyway, this file did not get Updated in TFS 2018 after adding the System.DirectoryServices package. Therefore, what the TFS 2018 Build server did was correct - looked at the cproj file and found assembly missing. I went to the Server and edited the cproj file to add the assembly and solved the problem.
来源:https://stackoverflow.com/questions/53660049/tfs-2018-build-fails-with-core-2-1-and-microsoft-windows-compatibility-2-0-1