refit icon indicating copy to clipboard operation
refit copied to clipboard

'IRequestBuilder' does not contain a definition for 'InterfaceHttpMethods'

Open kiwipiet opened this issue 8 years ago • 3 comments

Hi,

Using refit (4.6.16) with a WPF application using .NET 4.6.1, also tried 4.7.1

When building from Visual Studio (15 and 17) it builds fine in DEBUG and RELEASE. But on our build server I'm getting the following error:

obj\x86\Release\RefitStubs.g.cs (69): 'IRequestBuilder' does not contain a definition for 'InterfaceHttpMethods' and no extension method 'InterfaceHttpMethods' accepting a first argument of type 'IRequestBuilder' could be found (are you missing a using directive or an assembly reference?)

Any idea what the problem might be?

kiwipiet avatar Jun 29 '18 10:06 kiwipiet

How are you building it on your build server? Are you using packages.config for PackageReference? Is it doing a NuGet restore first in the build script?

clairernovotny avatar Jun 29 '18 12:06 clairernovotny

MSBuild (TFS2013) Have VS2015 (Update 3) installed on the build server packages.config

Have a MSBuild target that does a NuGet restore first, for all the solutions in the build.

We are busy building a new TFS2018 Update 2 server and build servers with VS2017, will try it there as soon as it is up and running as well.

Is there something that could be missing that I can go and check for in the build folders?

I do have another solution using a much older version of Refit that is building fine in the same build, could it be some sort of conflict?

kiwipiet avatar Jun 29 '18 22:06 kiwipiet

So the problem was that we had another solution in the build with an older version of refit. The build for that solution completed fine, but then this solution failed. I've upgraded all the projects to use the same version of refit and now the build works.

Thank you.

kiwipiet avatar Jun 30 '18 00:06 kiwipiet