'My executable file in the visual studio code is being deleted by McAfee automatically saying it detected a virus in it
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.
Solution 1:[1]
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.
Solution 2:[2]
You can exclude your project folder or where your a.exe is generated. Go through the steps given below:
- Open your McAfee security software.
- Click PC Security (on Windows).
- Click Real-Time scanning.
- Click Excluded Files.
- Click Add files.
- 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.
Solution 3:[3]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ishan Khandelwal |
| Solution 2 | Shubham |
| Solution 3 | Samay Rathod |
