Attribute not recognized, but Namespace is added

Asked

Viewed 332 times

-1

My attribute [DataContract] is not being recognized, but the namespace System.Runtime.Serialization is added in my using.

Does anyone know why?

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

namespace SuporteTecnicoContracts
{
    [DataContract(Namespace = "")]
    [Table(Name="T_PDV")]
    class T_PDV
    {
        public int IDPdv { get; set; }
        public string CNPJ { get; set; }
        public string RazaoSocial { get; set; }
        public string NomeFantasia { get; set; }
        public string Endereco { get; set; }
        public string Numero { get; set; }
        public string Complemento { get; set; }
        public string Bairro { get; set; }
        public string Cidade { get; set; }
        public string Estado { get; set; }
        public string CEP { get; set; }
        public int DDD { get; set; }
        public string Telefone { get; set; }
        public Nullable<int> DDDCelular { get; set; }
        public string Celular { get; set; }
        public string Email { get; set; }
        public int QtdeCheckOuts { get; set; }
        public Nullable<int> IDTipoRede { get; set; }
        public string NomeRede { get; set; }
        public int IDTipoEstabelecimento { get; set; }
        public string EnderecoIPInstalacao { get; set; }
        public System.DateTime DataCadastro { get; set; }
        public Nullable<System.DateTime> DataAlteracao { get; set; }
        public string CaminhoLogo { get; set; }
        public string TokenAuthentication { get; set; }
        public string Distrito { get; set; }
        public Nullable<decimal> Latitude { get; set; }
        public Nullable<decimal> Longitude { get; set; }
        public bool IS_Ativo { get; set; }
        public Nullable<int> ID_Rede { get; set; }
    }

....

  • You can post an example code?

  • 1

    Add the solution found as an answer and mark as correct or exlcua the question, so that it leaves the queue of unanswered questions

  • 4

    This question seems to be decontextualized because it is not a question needing an answer. It was an error that the user himself fixed and can no longer be reproduced.

1 answer

1


I have 4 projects in my Solution. I added the dll from Serialization, but I didn’t add in the project in question. I didn’t understand why I didn’t error using without the DLL. But I added it and it worked. I missed my attention, I recognize my error.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.