Have you referenced the nuget package : System.ServiceModel.Primitives ?
The error implies either a missing using statement or a missing package reference, but it's difficult to help more without more detail. If adding the above library doesn't resolve it please provide more details about your application including what the project type is and what references you already have - but hopefully the above will sort it....