A post-build event is an action that occurs after a project has been built. You can use a post-build event to digitally sign a binary (ObjectARX or Managed .NET) file after it has been built. The following steps explain how to add a post-build event that uses the SignTool.exe tool from the Windows SDK to digitally sign the target file of a project.
For more information on using the SignTool.exe tool, see "To Digitally Sign a Binary (ObjectARX or Managed .NET) File."
The following shows an example of signing the target file of the project with a password protected digital certificate stored in the MyCert.pfx file under the Autodesk folder:
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "C:\Autodesk\MyCert.pfx" /p MyPassword "$(TargetDir)$(TargetFileName)"
$(TargetDir) and $(TargetFileName) are macros that allow you to dynamically specify the build target folder and file name as part of the command-line programs to execute as part of the post-build event.
The Output window will display information about whether the post-build event completed successfully.
PostBuildEvent: "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "C:\Autodesk\MyCert.pfx" /p MyPassword "C:\Autodesk\AdskUtils\bin\x64\Release\AdskUtils.dll" Done Adding Additional Store Successfully signed: C:\Autodesk\AdskUtils\bin\x64\Release\AdskUtils.dll
The following shows an example of signing the target file of the project with a password protected digital certificate stored in the MyCert.pfx file under the Autodesk folder:
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "C:\Autodesk\MyCert.pfx" /p MyPassword "$(TargetDir)$(TargetFileName)"
$(TargetDir) and $(TargetFileName) are macros that allow you to dynamically specify the build target folder and file name as part of the command-line programs to execute as part of the post-build event.
The Output window will display information about whether the post-build event completed successfully.
PostBuildEvent: "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "C:\Autodesk\MyCert.pfx" /p MyPassword "C:\Autodesk\AdskUtils\bin\x64\Release\AdskUtils.dll" Done Adding Additional Store Successfully signed: C:\Autodesk\AdskUtils\bin\x64\Release\AdskUtils.dll
The following shows an example of signing the target file of the project with a password protected digital certificate stored in the MyCert.pfx file under the Autodesk folder:
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f "C:\Autodesk\MyCert.pfx" /p MyPassword "$(TargetDir)$(TargetFileName)"
$(TargetDir) and $(TargetFileName) are macros that allow you to dynamically specify the build target folder and file name as part of the command-line programs to execute as part of the post-build event.
The Output window will display information about whether the post-build event completed successfully.
1>PostBuildEvent: 1> Done Adding Additional Store 1> Successfully signed: C:\Autodesk\AdskUtils\bin\x64\Release\AdskUtils.arx