Q
Problem solve Get help with specific problems with your technologies, process and projects.

How can I make VS always run the command line?

My problem is with pre-build events. I have a custom resource compiler that receives as input a directory name, then it compiles all custom resource files in that directory and generates a header (if different from the previous version). So I want my Visual Studio to ALWAYS run that command line, regardless if it thinks the project is up to date. I've tried several things, but nothing works properly. The pre-build event never works right because it thinks the project is up-to-date and doesn't execute the pre-build. (I'm working in Visual C++ on Windows XP.)
Having the command always runs defeats the purpose of a build. However, I don't know your environment or what you're trying to accomplish. What you'll want to do is set up a custom build step for the particular header you want to produce. The trick is to specify $(InputDir)nul in the Additional Dependencies field. The nul will always return a newer time later than the file so your command will always run.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close