Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Build Event For Clean

sindizzy
New Contributor I
619 Views

In a VF project I know there are Build Events in properties. What I would like to do is delete some files in a directory if the project is Cleaned. There does not seem to be an option for that. There is also General>Extensions to Delete on Clean but that only deletes from the default folder. I would like to delete from a different folder as well.

0 Kudos
3 Replies
andrew_4619
Honored Contributor III
558 Views
You can define your own pre and post build events to do whatever you want.
0 Kudos
sindizzy
New Contributor I
500 Views

I get that but that is when you Build the Solution.

What I am looking for is an event when you Clean the solution.

How do I trigger an action when I click on Build>Clean Solution or Clean Project?

0 Kudos
jimdempseyatthecove
Honored Contributor III
453 Views

Open a oneAPI CMD prompt

cd to your solution folder

 

devenv YourSolutionNameHere.sln /clean
del YourExtraFilesHere.xxx

 

Once you have that working to your satisfaction, enter those commands into a batch file, and place a shortcut (or the batch file) on your desktop (or task bar). Then use that.

 

Note, with additional effort, you can add an external tool to the MS VS tool bar to run that batch file. But I will leave that for you as an exercise.

 

Jim Dempsey

 

Reply