Interface does not recognize same class type with declared DLL

0

I created a Class Library project and in it a POCO class. I created an Interface (all this following John Sharp's book). Then I created my WS with WCF. Well, in the interface I declared a method of the type of my class created in the Class Library and the interface did not recognize. I added the DLL in the project reference and even then I can not include it in the project. What should I do?

I'm trying in many ways and without success. I've already removed and added the DLL, rebooted the machine and still, nothing. The class is mapped to DataContract. The code looks like this:

using System.Data.Linq.Mapping;
using System.ServiceModel;
using System.Runtime.Serialization;

namespace SuporteTecnicoContracts
{ 
    [Table(Name="T_PDV")]
    [DataContract]
    public class TPDV
    {
        [Column]
        [DataMember]
        public int IDPdv { get; set; }
        [Column]
        [DataMember]
        public string CNPJ { get; set; }
        [Column]
        [DataMember]
        public string RazaoSocial { get; set; }
.......

My Interface

using System.ServiceModel.Web;
using SuporteTecnicoContracts;

namespace SuporteTecnico.Interface
{
    [ServiceContract]
    public interface ISuporteTecnicoContract
    {
        [OperationContract]
        [WebGet(UriTemplate = "/")]
        TPDV getCnpjParceiro(string _cnpj); ==> Não reconhece TPDV
    }
}
    
asked by anonymous 13.05.2014 / 00:41

1 answer

0

The following. I was with a svc within my main project. I've created a new WCF Service Application project aside. I created it and he created a separate project, getting my solution with 5 projects. This solved the problem of recognizing the type mentioned above. This problem solved. I just did not understand why it did not recognize when svc was on the same project.

    
13.05.2014 / 01:43