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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…