Autocontainment corrupts a file that is copied by visual studio


I am running windows 10 and comodo firewall 10. I also use MS Visual studio community edition to create some computerprogram. When i compile the program, a .dll file is copied from the output directory of the project to another folder. Autocontainment interferes with this process, resulting in inconsistent behaviour in explorer.

Steps to reproduce:

  • -open visual studio

  • create a new project of type Class library

  • add the following lines to "project - projectname properties - Build events - Post event command line:

    start copy /y “$(TargetPath)” “D:\Somefolder\Library”
    start explorer “D:\SomeFolder\Library”

  • build the project.

Expected behaviour: There should be a copy of the project .DLL file in the folder “D:\Somefolder\Library”

Actual outcome:

  • In the explorer windowe opened by visual studio (line 2 post build action), i can see the .DLL file.
  • In an explorer window which i open from the taskbar, i can open the same folder and NOT see the .DLL file.

I have veryfied that disabling auto-containment stops this inconsistency, turning it back on brings it back.
I have added the folder to the exceptions in Comodo firewall, which has worked arouind the problem. I’m still filing this as a bug because it means that under some circumstances autocontainment can cause a file to be hidden from regular view.

Create an auto-containment ignore rule and add the msbuild executable or the VS install folder to the file location criteria. It is not a bug as msbuild.exe creates and then executes a windows cmd script that contain the set command-line which is rated as unrecognized and will be run in containment due to auto-containment rules.