Automatically run Command before visual studio debug start

Viewed 719

I am developing a web application in asp core 3.1. and I am using react js in the project with server-side rendering.

But every time I di some changes in my react code. I have to rebuild the project manually by running this comment

npm run-script build

Is there any way. I can make put this command at automation.

So then I go for debugging. Does visual studio automatically run this command before starting the debugging process?

Thanks in advance

1 Answers

You can use project Build Events. Right click on the project, select Properties -> Build Events and enter your script into Pre-build event

enter image description here

Related