3

Till yesterday my Visual studio was working properly with all C programs running perfectly. But today i got one error saying

Program 'a.exe' failed to run: The system cannot find the file specifiedAt line:1 char:1* .
+ ./a.exe
+ ~~~~~~~.
At line:1 char:1
+ ./a.exe
+ ~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

This executable file was getting deleted by my McAfee automatically saying it detected a virus in it.

Please someone help me with this.

phuclv
  • 37,963
  • 15
  • 156
  • 475
Akash Benki
  • 31
  • 1
  • 1
  • 3
  • 2
    That's normal, as some AV are quite eager to find malware. You could exclude your project directories from scanning – JCWasmx86 Aug 06 '20 at 11:07
  • Actually delete your AV, they only make it easier for malware to infect your computer. As stated by google project zero. (The ones who found meltdown/spectre etc) – Fredrik Aug 06 '20 at 11:36

3 Answers3

3

I was facing the same problem but what I do is turn off real time scanning for the time I am using vs code and then programs run. Though this is not permanent solution but this works temporarily for me.

2

You can exclude your project folder or where your a.exe is generated. Go through the steps given below:

  1. Open your McAfee security software.
  2. Click PC Security (on Windows).
  3. Click Real-Time scanning.
  4. Click Excluded Files.
  5. Click Add files.
  6. Browse to, and select the files, which you want to be excluded from the virus scan.

In this way, you can tell your virus scanner that these are known safe files not a trojan or malware.

Shubham
  • 1,153
  • 8
  • 20
  • 1
    THANKS MAN !!! i tried it but its again deleting it and again asking me to add file if its safe.When i add again its deleting and repeating the same dialogue – Akash Benki Aug 08 '20 at 19:04
1

There is no any fault of visual studio code or your Mingw Compiler. There is some issues with McAfee virus protector. I also had same problem. But I have change my virus protector and now my problem is solved.So you can try it.