visual studio pre build event not working

Code Example - visual studio pre build event not working

                
                        add to the project file

<PropertyGroup>
    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>