Variables are not available in Visual Studio build events.
yonotsui
40
Reputation points
I defined and used variables in the VIsualStudio post-build event.
The variable name "outputDir" is used in set, and the variable is used in %outputDir%.
However, %outputDir% is not recognized as a variable.
Why can't it be used as a variable?
I would appreciate it if you could give me some advice.
・Post-build event
call set outputDir=$(MSBuildProjectDirectory)\bin$(Configuration)$(TargetFramework)\
echo OutDir:%outputDir%
・Output content
call set outputDir=F:\Program\FW\FW_Migration\HostApplication\bin\Debug\net8.0-windows\
echo OutDir:%outputDir%
Developer technologies | Visual Studio | Other
5,451 questions
Sign in to answer