I created an add-in earlier this year. Used it for a few months. We went in a different direction but the client and their staff kinda fell short. So I went to go back and use the earlier add-in and now the TableToGeodatabase_conversion breaks pro. There is no error and pro just disappears. This had been working before and I can run the conversion from the Geoprocessing in Pro and Desktop with the same files and it runs fine.
The code always bails at line 10. Nothing is being caught and pro just closes and I get the send report "ArcGIS Application has stopped working" dialog.
I had upgraded to 2.8 sometime in-between. I upgraded to 2.9 today.
Geoprocessor gp = new Geoprocessor();
gp.OverwriteOutput = true;
gp.AddOutputsToMap = true;
IGeoProcessorResult myresult = new GeoProcessorResult();
IVariantArray parameters = new VarArray();
parameters.Add(Properties.Resources.csvFilePath);
parameters.Add(Properties.Resources.ltGDB);
try
{
myresult = (IGeoProcessorResult)gp.Execute("TableToGeodatabase_conversion", parameters, null);
while (myresult.Status == esriJobStatus.esriJobExecuting)
Thread.Sleep(1000);
parameters.RemoveAll();
parameters.Add(Properties.Resources.gdbTablePath);
parameters.Add("PARCELID");
parameters.Add("!PARCELID!.replace('a','')");
myresult = (IGeoProcessorResult)gp.Execute("CalculateField_management", parameters, null);
gp = null;
}