File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 113113 </PropertyGroup >
114114 </Target >
115115 <Target Name =" SignAssemblies" AfterTargets =" PostBuildEvent" Condition =" '$(Configuration)'=='Publish'" >
116- <Exec Command =" call " $(ProjectDir)..\..\signfile.bat" " $(TargetPath)" " />
116+ <Exec Command =" call " $(ProjectDir)..\..\signfile.bat" " $(TargetPath)" "
117+ IgnoreStandardErrorWarningFormat =" true" />
117118 </Target >
118119</Project >
Original file line number Diff line number Diff line change @@ -14,13 +14,18 @@ set SignToolDir=C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\
1414set SignTool = %SignToolDir% signtool.exe
1515
1616echo Preparing to sign %Target%
17- echo " %SignTool% " sign /f " %CodesignFile% " /fd sha256 /tr " %TimestampUrl% " /td sha256 /p " %CodesignPass% " %Target% || exit /b 1
18- echo Waiting for 20 seconds before issuing command (avoid timeserver rejection)
17+ echo " %SignTool% " sign /f " %CodesignFile% " /fd sha256 /tr " %TimestampUrl% " /td sha256 /p PASSWORD %Target
1918
2019rem Timestamp server requires 15 seconds or more between signing requests
2120rem When publishing need to limit parallel build tasks to 1 in Tools| Options| Projects and Solutions| Build and Run
22- ping -n 20 127.0.0.1 > NUL
21+ set attempts = 10
22+ :DoWhile
23+ echo %attempts% attempts remaining
24+ echo Waiting for 30 seconds before issuing command (avoid timeserver rejection)
25+ ping -n 30 127.0.0.1 > NUL
26+ " %SignTool% " sign /f " %CodesignFile% " /fd sha256 /tr " %TimestampUrl% " /td sha256 /p " %CodesignPass% " %Target% && goto EndDoWhile
27+ set /a attempts = %attempts% - 1
28+ if %attempts% gtr 0 goto DoWhile
29+ :EndDoWhile
2330
24- " %SignTool% " sign /f " %CodesignFile% " /fd sha256 /tr " %TimestampUrl% " /td sha256 /p " %CodesignPass% " %Target% || exit /b 1
25-
26- " %SignTool% " verify /pa /tw %Target% || exit /b 1
31+ " %SignTool% " verify /pa /tw %Target%
You can’t perform that action at this time.
0 commit comments