Uri Hendler - 57 - Sep 17, 2014

I’m having a strange issue after upgrading from v4.0.23 to v4.0.31.

I have a class that implements the IRequest interface. After upgrading, I had to add a reference to the System.Net.dll assembly to get the project to build. I made sure to clear out all pre-4.0.3x packages too.

This worked fine, but it refuses to build on my build server. I’m getting these messages in the msbuild output:

 c:\build-dir\ERPS-JOB1\ERPServices\packages\ServiceStack.Interfaces.4.0.31\lib\portable-wp80+sl5+net40+win8+monotouch+monoandroid\ServiceStack.Interfaces.dll :
 warning CS1684: Reference to type ‘System.Net.HttpStatusCode’ claims it is defined in ‘c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Net.dll’, but it could not be found [C:\build-dir\ERPS-JOB1\ERPServices\Libraries\ERP.Common\ERP.Common.csproj]
Validation\CustomHttpRequest.cs(10,18): error CS0738: ‘ERP.Common.Validation.CustomHttpRequest’ does not implement interface member ‘ServiceStack.Web.IRequest.get_Cookies()’. ‘ERP.Common.Validation.CustomHttpRequest.Cookies.get’ cannot implement ‘ServiceStack.Web.IRequest.get_Cookies()’ because it does not have the matching return type of ‘void’. [C:\build-dir\ERPS-JOB1\ERPServices\Libraries\ERP.Common\ERP.Common.csproj]

The relevant parts of the code are:

using System;
using System.Collections.Generic;
using System.Net;
using ServiceStack;
using ServiceStack.Configuration;
using ServiceStack.Web;

namespace ERP.Common.Validation
public class CustomHttpRequest : IRequest
public IDictionary<string, Cookie> Cookies
get { throw new NotImplementedException(); }

Any ideas?

If it’s only a .NET 4.0 build server you will need to install a patch, See this answer for details: http://stackoverflow.com/a/25863800/85785