In Visual Studio 2012 (C#) How to Create Custom Macros available in Post Build

こ雲淡風輕ζ 提交于 2019-11-29 00:02:54

Though you won't see your macro in the Macros>> list, you can edit your .csproj file by hand. Look for the first <PropertyGroup> and add this right before the closing </PropertyGroup>:

<SignCommandLinePrefix>"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\signtool.exe" sign /f MYPFXFILEPATH /p MYPASSWORD /t http://timestamp.verisign.com/scripts/timstamp.dll</SignCommandLinePrefix>

Now, you can add $(SignCommandLinePrefix) $(TargetDir)$(TargetFileName) to your Post-Build Event and it will work just as you wish.

Check out Chuck England's response to this question: http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/e774f871-8fc2-4875-b791-1df3dd0bb2dc/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!