Visual Studio Build Events not working in VSTS

I have been trying to get the Build events working in VSTS but not able to find any solution. I have ASP.NET MVC projects and all of them having post build events which needs to be working in order to produce full package of website.

Build is running fine but failed when it's going to create package and not able to find some project included files which is supposed to be created by post build event.

On reviewing logs, I can see post build event is not getting triggered.

I only have below line in Post Build Event

$(ProjectDir)bundler\bundler.cmd

Is anyone else faced this problem and have any solution?

I'm building my project in VSTS and the task name is Visual Studio Build on Hosted VS2017 Agent.

Any help would be appreciated.

Thanks