Search code examples
xamarinservicestackservicestack-text

Cannot use Service Stack inside a PCL


I am using Xamarin and need to use a PCL

However, I cannot install ServiceStack into the PCL other than the PCL package which is classed as no longer being maintained

Has anyone come across this?

I want to use PCL because I dont want to duplicate code

PCLs are supposed to be supported via the latest Service Stack but this does not appear to be the case

I have code which makes use of ToJson which is in ServiceStack.TExt

I know I could create a folder inside my iphone (and android) assemblies but I am not sure this is a good approach because it doesnt feel right (everything all in one place instead of in proper layers)

Does anyone have any ideas about this?

Paul


Solution

  • Your assumptions aren't correct, ServiceStack PCL Packages ARE still being maintained, but instead of being maintained in individual packages, e.g:

    • ServiceStack.Client.Pcl
    • ServiceStack.Text.Pcl
    • ServiceStack.Interfaces.Pcl

    They have now been merged as different profiles into the main client NuGet packages, e.g: