Hi there, this is still a problem; I raised a subsequent issue but havent seen it approved yet. that gave more details.
Today I reverted back to some very old code and this compiled ok. then as I started building on the code, I hit the same problem.
Here's code snippet that causes the virus detection frm ESET (as it seems random, you dont need to understand the context, more note the next step of commenting out most of it):
//------------------------------------------------------------------------------
public static bool readScheduleFile(string profileName, int portnum, ref string profileData)
{
var fd = FileIO.fullProfileDescriptor(profileName, portnum, FileIO.dontCreate);
var sr = new StreamReader(fd);
Schedule tmpSched = new Schedule();
reset(0);
while (!sr.EndOfStream)
{
profileData = sr.ReadLine();
if (profileData == null)
Console.WriteLine("Exception: Filename");
else
{
string[] result = profileData.Split('|');
Console.WriteLine(profileData);
}
}
return false;
}
//--------------------------------------------------------------
and here I comment everything out of body and it builds ok
//------------------------------------------------------------------------------
public static bool readScheduleFile(string profileName, int portnum, ref string profileData)
{
//var fd = FileIO.fullProfileDescriptor(profileName, portnum, FileIO.dontCreate);
//var sr = new StreamReader(fd);
//Schedule tmpSched = new Schedule();
//reset(0);
//while (!sr.EndOfStream)
//{
// profileData = sr.ReadLine();
// if (profileData == null)
// Console.WriteLine("Exception: Filename");
// else
// {
// string[] result = profileData.Split('|');
// Console.WriteLine(profileData);
// }
//}
//return false;
}
What happens is imediately after the build, ESET kicks in and deletes the .EXE before visual studio can run it.
It is not only that code, tehre doesnt seem to be any pattern; by selectively commenting out code I get to buikld and run with no issue, then uncomment and I get the issue,
any thoughts please?