Errors in Visual Studio

Asked

Viewed 64 times

0

Visual Usage Studio Express 2013 for Web.

I don’t know much about him, I’ve been learning in practice.

It indicates many errors as if my class had not determined attribute.

I noticed that this happens mainly when you change a class by adding some attribute. The new attribute seems not to be interpreted.

And you see, if I have a Build, there is no error, the project is compiled in its entirety. I can run and nothing wrong will happen.

Minutes later, in the Error List errors start to appear indicating that those new attributes are not part of the class such. And on the screen, in the View where that attribute was used, or in the Controller, it appears underlined indicating a possible error.

Now an example: This is my class:

public class ContaAReceber 
{
    [Key]
    public int ID { get; set; }

    [Required]
    public int TipoReceitaID { get; set; }
    public virtual TipoReceita  TipoReceita { get; set; }

    [Required]
    public int CentroCustoID { get; set; }
    public virtual CentroCusto  CentroCusto { get; set; }

    public int? HonorarioID { get; set; }        
}

In the class it can be seen that there is an Honorarioid attribute.

Now look at the image of my VC showing as if there was no attribute:

inserir a descrição da imagem aqui

it is as if VS had saved and compiled the class in its initial form and not renewed it.

Can someone tell me what’s going on and how to make it stop.

Thanks in advance.

  • Post some code (attributes of these classes) and images in a way that illustrates the problem. About build

  • What is ContasAReceberDAO? Apparently it’s Entity Framework, right?

  • Yes, it is EF, Contasareceberdao is a class that does small write operations in bank. But that’s beside the point. If I put any method in a class, compile it, and later change, for example, the parameters. It presents an error saying that there is no Overload with the new parameters. And this in more than 30 classes. It is not the case of one of them.

  • It is as if VS compiles the class with the original parameters and no longer accepts to change and compile again.

  • Any special reason to use such an old version of VS? Maybe it’s worth more installing the new one than trying to solve the problems in this old one: Visual Studio 2017 Communityedition

No answers

Browser other questions tagged

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