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.
Asked
Active
Viewed 111 times
-2
-
What troubleshooting steps have you attempted? – Daniel Mann Dec 06 '18 at 23:48
-
a. I opened the project with VS2017 on the Build server and added the Microsoft.Windows.Compatibility 2.0.1 package. This didn't work. b. I'm now upgrading the VS2017 to 15.9.3 – twc Dec 07 '18 at 11:17
-
Build failed:The type or namespace name 'DirectoryServices' does not exist in the namespace 'System' (are you missing an assembly reference?) ; that didn't work. IT DOES work locally on workstation but not on build server. It did work before I added the compatibility package for directory services. – twc Dec 07 '18 at 11:56
-
Install-Package System.DirectoryServices -Version 4.5.0, I removed the Microsoft.Windows.Commpatibility 2.0.1 package and still get Build Failed: as stated above. – twc Dec 07 '18 at 16:33
1 Answers
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.

twc
- 449
- 1
- 3
- 12