Using Developer Command Line in Build events (or bat files)

Viewed 28

I want to compile a resource before building, hence using the build event before building. I want to open the "Developer command prompt" and run rc.exe myFile.rc

In my build event, pre-build, I can simply add

"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x86\rc.exe" $(ProjectDir)TestFile1.rc

The issue is that there are a number of folders in that bin, 10.0.otherNumbers... so this line works on my computer, but not necessary on other computer or in the future.

Is there a macro, like $(DevEnvDir) for the right path here?

Something like:

"$(DeveloperCommandPrompt)\rc.exe" $(ProjectDir)TestFile1.rc

Or a way to enter developer Command prompt from the ordinary command prompt, as it would be needed in a bat file

0 Answers
Related