1
Doing some tests on an old system, I arrived at a strange behavior for the Visual Studio part. When I hover over a variable of a specific type, Visual Studio closes, as you can see in the GIF below:
(Note that queries appear in the name of properties for a few moments.
At first, I thought he went into some kind of loop in the get
of some property, but I put breakpoints in all class properties and that didn’t happen.
The object I assess at first is of the type:
List<EntrevDeslig.Planilha> listaDados = new List<EntrevDeslig.Planilha>();
And the attributes of the object Planilha
are the following:
private string _nomeplan;
public string sNomePlan { get { return _nomeplan; } set { _nomeplan = value.Replace("'", "''"); } }
private string _tituloplan { get { return _tituloplan; } set { _tituloplan = value.Replace("'", "''"); } }
public string sTituloPlan;
private string _grade;
public string sGrade { get { return _grade; } set { _grade = value.Replace("'", "''"); } }
private string _quesito;
public string sQuesito { get { return _quesito; } set { _quesito = value.Replace("'", "''"); } }
private string _dataini;
public string sSdataIni { get { return _dataini; } set { _dataini = value.Replace("'", "''"); } }
private string _datafim;
public string sSdataFim { get { return _datafim; } set { _datafim = value.Replace("'", "''"); } }
private string _grupocar;
public string sGrupoCar { get { return _grupocar; } set { _grupocar = value.Replace("'", "''"); } }
private string _cargo;
public string sCargo { get { return _cargo; } set { _cargo = value.Replace("'", "''"); } }
private string _datareg;
public string sSdataReg { get { return _datareg; } set { _datareg = value.Replace("'", "''"); } }
private string _chave;
public string sChave { get { return _chave; } set { _chave = value.Replace("'", "''"); } }
public int iOrdem;
private string _titulo;
public string sTitulo { get { return _titulo; } set { _titulo = value.Replace("'", "''"); } }
private string _titulopai;
public string sTituloPai { get { return _titulopai; } set { _titulopai = value.Replace("'", "''"); } }
private string _processo;
public string sProcesso { get { return _processo; } set { _processo = value.Replace("'", "''"); } }
private string _nivel;
public string sNivel { get { return _nivel; } set { _nivel = value.Replace("'", "''"); } }
public string BCOID;
public string sOPC;
The problem only happens when I evaluate the Worksheet class, not the list.
Did anyone have a similar problem? Or at least know some way to identify the cause of the problem (VS logs, something like that.)? The system works perfectly in production environment, but I would like to correct this, or at least understand
Have you checked if it’s an extension? I’ve had a similar problem, and when I deactivated the extensions, I identified one that when activated, I didn’t let it debug normally. I can’t remember the name of the extension.
– Ismael
@But I don’t use any extension, and it’s just in that object
Planilha
that this happens– Artur Trapp
The only thing abnormal I’ve seen in the attributes is the
get
andset
in the private variable.private string _tituloplan { get { return _tituloplan; } set { _tituloplan = value.Replace("'", "''"); } }
public string sTituloPlan;
instead of being in the public variable.– Ismael
@How can this be the cause of the problem? The funny thing is that the system works perfectly in production...
– Artur Trapp
That’s why I put as "abnormal", I could not perform a practical test. Didactically I do not know how to report this scenario.
– Ismael