'Dependency issue when migrating Teamcity build server

I'm migrating a Teamcity server from one VM to another as we're closing the office where the current VM is hosted, I'm doing this by rebuilding the server rather than migrating the VM as there's a bunch of infrastructure differences between the DCs.

The majority of projects are now building fine on the new server however one project is giving me an error. The solution builds ok on my local machine and on the old build server, it's just the new server where I get this build error. The class mentioned in the error message does have a reference to System.Net.Http and is compiling on my local which is what is confusing me.

\ExceptionHelper.cs(15, 28): error CS1061: 'HttpRequestMessage' does not contain a definition for 'CreateResponse' and no accessible extension method 'CreateResponse' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?)

\ExceptionHelper.cs(31, 28): error CS1061: 'HttpRequestMessage' does not contain a definition for 'CreateResponse' and no accessible extension method 'CreateResponse' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source