More nooobness - splitting projects as recommended - NuGet referencing.

61 views
Skip to first unread message

matt tagliaferri

unread,
Mar 8, 2012, 9:41:38 AM3/8/12
to servic...@googlegroups.com
Locked in my all-Microsoft world for too long, finally coming out to learn about better web services (servicestack), NuGet, GitHub, etc.  And trying to learn them all at the same time!  Ugh.

This isn't an SS question directly, but I am interested in splitting my project up as recommended, with a "ServiceInterface" project and a "ServiceModel" project.  I am unsure how to manage which SS DLLs are referenced in each project using NuGet. This looks like it gets further complicated when you add a "test" project, which needs everything in ServiceStack.Common, but also ServiceStack.ServiceInterface as well. 

Do you just install all of ServiceStack using NuGet then delete the DLLs you don't want in each project?  Won't you have to repeat this every time you update to a new version, then?

thanks
matt tag

Demis Bellot

unread,
Mar 8, 2012, 10:50:59 AM3/8/12
to servic...@googlegroups.com
Hi,

For the NuGet packages I would just do something like:

Host < ServiceStack
  ServiceInterface < ServiceStack
  ServiceModel < ServiceStack.Common

You'll need to specify it individually per project.

Then to update the NuGet packages do 'Manage NuGet' from the solution level which should allow you to update all the projects in a batch - correctly updating the right dlls in each project.

Cheers,

matt tagliaferri

unread,
Mar 8, 2012, 11:16:04 AM3/8/12
to servic...@googlegroups.com
thanks much.  Potential problem found, the Authenticate attribute is found in ServiceStack.ServiceInterface, meaning you cannot attach it to inbound DTOs that are in a separate project that contains only ServiceStack.Common assemblies.  Will this attribute work on the service class itself?


    [Authenticate]
    [DataContract]
    [Description("Hello World web service, requiring authentication.")]
    [RestService("/helloauth")]
    public class HelloAuth
    {    
    }

matt tagliaferri

unread,
Mar 8, 2012, 11:18:41 AM3/8/12
to servic...@googlegroups.com
you can disregard, the [Authenticate] does in fact work on the service class.

Demis Bellot

unread,
Mar 8, 2012, 11:56:48 AM3/8/12
to servic...@googlegroups.com
Yep as you've noticed you can put request filter attrs on both the Request DTO or Service class.

Cheers,
Reply all
Reply to author
Forward
0 new messages