TeamCitySharp (TCS) is a simple .net wrapper that will let you interact with a TeamCity server providing you have a login for that system. TeamCity has a REST API but this wrapper will help simplify the calls that that API and deserialize the response for the server into POCOs for you. In order to get a list of projects on a TeamCity server you would make the request to the following URL:http://<serverurl>/httpAuth/app/rest/projectsIn order to interact with this, you could use EasyHTTP or HTTP WebRequest. You would set up a connection, specify a content type, give user credentials and then get a response back that you can use. TeamCitySharp has taken care of this for you. The corresponding code to make the same code using TeamCitySharp would be as follows: There are a number of methods available that will let you get projects, build status’, build types, users, agents, user groups and server information. The project cannot be used to create projects or build types. This is due to the absence of the appropriate calls on the TeamCity REST API. A full list of functionality of the TeamCitySharp API calls can be found in the documentation. I have created a TeamCitySharp nuget package and you can install that from nuget command line using the comment:install-package TeamCitySharpRead more: .NET Zone
QR:
QR: