File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 257
257
ExpectedDelaySigned =" false"
258
258
ContinueOnError =" false"
259
259
Condition =" !$(DelaySign) and '@(DelaySignedAssembliesToSign)' != ''" />
260
-
260
+
261
+ <Exec Command =" $(PowerShellCommand) -NonInteractive -NoLogo -NoProfile -Command " . $(LibraryToolsFolder)\CheckStrongNameSignature.ps1 " " />
262
+
261
263
<!-- Copying signed shortcut back -->
262
264
<Copy SourceFiles =" $(LibrarySourceFolder)\Package\$(Configuration)\AzureRM.psd1"
263
265
DestinationFolder =" $(LibraryRoot)tools\AzureRM" />
Original file line number Diff line number Diff line change
1
+ function Check-StrongName {
2
+ [CmdletBinding ()]
3
+ param ([Parameter (ValueFromPipeline = $true )][string ]$path )
4
+ $output = & " sn.exe" - vf $path
5
+ $length = $output.Length - 1
6
+ if (-not $output [$length ].Contains(" is valid" )) {
7
+ Write-Output " $path has an invalid string name."
8
+ }
9
+ }
10
+
11
+ function Check-All {
12
+ $invalidList = Get-ChildItem - Recurse - Filter * .dll | % {Check- StrongName - path $_.FullName }
13
+
14
+ if ($invalidList.Length -gt 0 ) {
15
+ Write-Output ($invalidList )
16
+ throw " Strong name signature checked failed. One (or more) of the dlls has an invalid string name."
17
+ }
18
+ }
You can’t perform that action at this time.
0 commit comments