Error: Does not contain a definition for 'CreateServiceRemotingListener' and no extension method 'CreateServiceRemotingListener' accepting a first argument of type could be found (are you missing a using directive or an assembly reference?)
Below are the steps which I followed,
Created an interface that implements IService.
`
using Microsoft.ServiceFabric.Services.Remoting; using System.Threading.Tasks; public interface IFileService: IService { Task<string> GetStringByName(string name); }
`
Included following packages in stateful service named as FileService.
`
using System. Fabric; using Microsoft.ServiceFabric.Data; using Microsoft.ServiceFabric.Data.Collections; using Microsoft.ServiceFabric.Services.Communication.Runtime; using Microsoft.ServiceFabric.Services.Runtime;
`
Implemented IFileService interface in FileService.
`
internal sealed class FileService : StatefulService, IFileService { public FileService(StatefulServiceContext context) : base(context) { } public FileService(StatefulServiceContext context, IReliableStateManagerReplica stateManagerReplica) : base(context, stateManagerReplica) { } public Task<string> GetStringByName(string name) { return Task.FromResult<string>(name); } /// <summary> /// Optional override to create listeners (e.g., HTTP, Service Remoting, WCF, etc.) for this service replica to handle client or user requests. /// </summary> /// <remarks> /// For more information on service communication, see https://aka.ms/servicefabricservicecommunication /// </remarks> /// <returns>A collection of listeners.</returns> protected override IEnumerable<ServiceReplicaListener> CreateServiceReplicaListeners() { return new[] { new ServiceReplicaListener(this.CreateServiceRemotingListener) }; }}
`