ServiceStack EndpointHostConfig & WebHost does not exist? C# MVC
c#, servicestack, visual-studio-2013
Solution
You are probably referencing the v4 ServiceStack framework which has just been released into beta. There has been a lot of refactoring and restructuring of the namespaces and classes which is where the conflict will arise.
These release notes for v4 discuss the significant changes made to ServiceStack from v3 to v4.
The part most relevant to you is:
EndpointHostConfig is now HostConfig and is limited to just Configuration.
A lot of the tutorials are still for v3 which is OpenSource, which is what I suspect you are following.
You should include the version number in your nu-get install. Such as:
PM> Install-Package ServiceStack -Version 3.9.71
This will get you the latest OpenSource version of ServiceStack (3.9.71). Or alternatively see the v4 documentation.
v3 Documentation - Relevant for your tutorials v4 (Latest - commercial)
Hope this helps.
Problem
Following a tutorial of using ServiceStack, I'm trying to compile the following code: ``` public class AppHost : AppHostBase { public AppHost() : base("Protein Tracker Web Services", typeof(HelloService).Assembly) { } public override void Configure(Funq.Container container) { SetConfig(new EndpointHostConfig { ServiceStackHandlerFactoryPath = "api" }); } } ``` This gives me the following error: The type or namespace name 'EndpointHostConfig' could not be found (are you missing a using directive or an assembly reference?) I tried to add the suggested: ``` using ServiceStack.WebHost.Endpoints; ``` Gives me the following error: The type or namespace name 'WebHost' does not exist in the namespace 'ServiceStack' (are you missing an assembly reference?)