Tilee/everything signing (#1296)
This commit is contained in:
Родитель
abfb7c1540
Коммит
f1d2e3fde6
|
@ -1,317 +0,0 @@
|
|||
|
||||
# This script checks the Authoring Requirements listed here:
|
||||
# Full Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/MicrosoftPackages.aspx
|
||||
# Authoring Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/AuthoringRequirements.aspx
|
||||
# Signing Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/SigningMicrosoftPackages.aspx
|
||||
Param(
|
||||
[Parameter(Mandatory=$true,HelpMessage="Path to Artifact files (nupkg):")]
|
||||
[string]
|
||||
$path,
|
||||
[Parameter(Mandatory=$true,HelpMessage="Full Log?:")] #Include Pass with Fail output?
|
||||
[bool]
|
||||
$verboseLog
|
||||
)
|
||||
|
||||
|
||||
$requiredCopyright = "$([char]0x00A9) Microsoft Corporation. All rights reserved.";#"© Microsoft Corporation. All rights reserved.";
|
||||
$expectedProjectUrl = "https://go.microsoft.com/fwlink/?LinkId=392727"; # Application Insights Project Url
|
||||
$expectedLicense = "MIT"; # MIT license Url
|
||||
$expectedOwner = "AppInsightsSdk"; # Application Insights Nuget Account
|
||||
$expectedTags = @("Azure","Monitoring");
|
||||
|
||||
$sb = [System.Text.StringBuilder]::new();
|
||||
|
||||
$script:isValid = $true;
|
||||
|
||||
|
||||
# Get the latest Nuget.exe from here:
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
|
||||
Write-Host "Nuget.exe not found. Attempting download...";
|
||||
Write-Host "Start time:" (Get-Date -Format G);
|
||||
$downloadNugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe";
|
||||
$saveFile = "$PSScriptRoot\Nuget.exe";
|
||||
(New-Object System.Net.WebClient).DownloadFile($downloadNugetUrl, $saveFile);
|
||||
Write-Host "Finish time:" (Get-Date -Format G);
|
||||
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
throw "Error: Nuget.exe not found! Please download latest from: https://www.nuget.org/downloads";
|
||||
}
|
||||
}
|
||||
|
||||
function Write-Break() {
|
||||
$displayMessage = "========== ========== ========== ========== ==========";
|
||||
Write-Host "";
|
||||
Write-Host $displayMessage;
|
||||
$null = $sb.AppendLine();
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-Name([string]$message) {
|
||||
Write-Host $message;
|
||||
$null = $sb.AppendLine($message);
|
||||
}
|
||||
|
||||
function Write-IsValid ([string]$message) {
|
||||
if ($verboseLog) {
|
||||
$displayMessage = "`tPass:`t$message";
|
||||
Write-Host $displayMessage -ForegroundColor Green;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
}
|
||||
|
||||
function Write-SemiValid ([string]$message, [string]$recommendedDescription) {
|
||||
$displayMessage = "`tReview:`t$message [Recommended: $recommendedDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Yellow;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-NotValid ([string]$message, [string]$requiredDescription) {
|
||||
$displayMessage = "`tFail:`t$message [Required: $requiredDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Red;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
$script:isValid = $false;
|
||||
}
|
||||
|
||||
function Test-Condition ([bool]$condition, [string]$message, [string]$requiredDescription) {
|
||||
if ($condition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Test-MultiCondition ([bool]$requiredCondition, [bool]$recommendedCondition, [string]$message, [string]$requiredDescription, [string]$recommendedDescription) {
|
||||
if ($requiredCondition) {
|
||||
if($recommendedCondition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-SemiValid $message $recommendedDescription
|
||||
}
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsPackageSigned([string]$nupkgPath) {
|
||||
$verifyOutput = "";
|
||||
$null = .\Nuget.exe verify -signature -CertificateFingerprint 3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE $nupkgPath -verbosity detailed 2>&1 | Tee-Object -Variable verifyOutput
|
||||
|
||||
#TEST OUTPUT
|
||||
Write-Host $verifyOutput
|
||||
|
||||
$output = $verifyOutput[$verifyOutput.Length-1]
|
||||
|
||||
$success = ($output -like "Successfully verified*");
|
||||
|
||||
if (!$success){
|
||||
$verifyOutput | Where-Object { $_ -like "NU*" -and $_ -notlike "NUGET*"} | ForEach-Object {
|
||||
$output = "$output $_" -replace "`n","" -replace "`r","";
|
||||
}
|
||||
}
|
||||
|
||||
$message = "Is Signed: $output";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($success) $message $requirement;
|
||||
}
|
||||
|
||||
|
||||
function Get-IsDllSigned ([string]$dllPath) {
|
||||
$test = Get-AuthenticodeSignature $dllPath; # this is equivalent to signtool.exe verify /pa
|
||||
$SignedStatus = $test.Status;
|
||||
$SignatureValid = [System.Management.Automation.SignatureStatus]::Valid;
|
||||
|
||||
$message = "Is Signed: $SignedStatus";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($SignedStatus -eq $SignatureValid) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-DoesXmlDocExist ([string]$dllPath) {
|
||||
# CONFIRM .XML DOCUMENTATION FILE EXISTS WITH EACH DLL
|
||||
[string]$docFile = $dllPath -replace ".dll", ".xml";
|
||||
|
||||
$message = "XML Documentation:";
|
||||
$requirement = "Must exist."
|
||||
Test-Condition (Test-Path $docFile) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidPackageId([xml]$nuspecXml) {
|
||||
$id = $nuspecXml.package.metadata.id;
|
||||
|
||||
$message = "Package Id: $id";
|
||||
$requirement = "Must begin with 'Microsoft.'"
|
||||
|
||||
Test-Condition ($id.StartsWith("Microsoft.")) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidAuthors([xml]$nuspecXml) {
|
||||
$authors = $nuspecXml.package.metadata.authors;
|
||||
|
||||
$message = "Authors: $authors";
|
||||
$requirement = "Microsoft must be the only author.";
|
||||
|
||||
Test-Condition ($authors -eq "Microsoft") $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidOwners([xml]$nuspecXml) {
|
||||
$owners = $nuspecXml.package.metadata.owners;
|
||||
$ownersList = $owners -split ',';
|
||||
|
||||
$message = "Owners: $owners";
|
||||
$requirement = "Must include Microsoft."
|
||||
$recommendation = "Should include nuget owner."
|
||||
|
||||
Test-MultiCondition ($ownersList -contains "Microsoft") ($ownersList -contains $expectedOwner -and $ownersList.Length -eq 2) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidProjectUrl([xml]$nuspecXml) {
|
||||
$projectUrl = $nuspecXml.package.metadata.projectUrl;
|
||||
|
||||
$message = "Project Url: $projectUrl";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($projectUrl -eq $expectedProjectUrl) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicense([xml]$nuspecXml) {
|
||||
$license = $nuspecXml.package.metadata.license.InnerText;
|
||||
|
||||
$message = "License Url: $license";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($license -eq $expectedLicense) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicenseAcceptance([xml]$nuspecXml) {
|
||||
$requireLicenseAcceptance = $nuspecXml.package.metadata.requireLicenseAcceptance;
|
||||
|
||||
$message = "Require License Acceptance: $requireLicenseAcceptance";
|
||||
$requirement = "Not mandatory requirement."
|
||||
$recommendation = "Should require.";
|
||||
|
||||
Test-MultiCondition ($true) ($requireLicenseAcceptance -eq $true) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidCopyright([xml]$nuspecXml) {
|
||||
$copyright = $nuspecXml.package.metadata.copyright;
|
||||
|
||||
$message = "Copyright: $copyright";
|
||||
$requirement = "Must match '$requiredCopyright'";
|
||||
|
||||
Test-Condition ($copyright -eq $requiredCopyright) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidDescription([xml]$nuspecXml) {
|
||||
$description = $nuspecXml.package.metadata.description;
|
||||
$hasDescription = !([System.String]::IsNullOrEmpty($description));
|
||||
|
||||
$message = "Description: $description";
|
||||
$requirement = "Must have a description."
|
||||
|
||||
Test-Condition $hasDescription $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidTags([xml]$nuspecXml) {
|
||||
$tags = $nuspecXml.package.metadata.tags;
|
||||
$hasTags = !([System.String]::IsNullOrEmpty($tags));
|
||||
|
||||
$message = "Tags: $tags";
|
||||
$requirement = "Must have tags."
|
||||
Test-Condition $hasTags $message $requirement;
|
||||
|
||||
$tagsArray = @();
|
||||
if($hasTags) {
|
||||
$tagsArray = $tags -split " ";
|
||||
}
|
||||
|
||||
$expectedTags | ForEach-Object {
|
||||
$hasTag = $tagsArray.Contains($_);
|
||||
$requirement = "Must include tag: $_";
|
||||
Test-Condition $hasTag $message $requirement;
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsValidLogoUrl([xml]$nuspecXml, $path) {
|
||||
$logoUrl = $nuspecXml.package.metadata.iconUrl;
|
||||
$isEmpty = [System.String]::IsNullOrEmpty($logoUrl);
|
||||
$dimension = "";
|
||||
|
||||
try {
|
||||
$filePath = Join-Path $path "logo.png";
|
||||
$wc = New-Object System.Net.WebClient;
|
||||
$wc.DownloadFile($logoUrl, $filePath);
|
||||
add-type -AssemblyName System.Drawing
|
||||
$png = New-Object System.Drawing.Bitmap $filePath
|
||||
$dimension = "$($png.Height)x$($png.Width)";
|
||||
|
||||
# Release lock on png file
|
||||
Remove-Variable png;
|
||||
Remove-Variable wc;
|
||||
} catch [System.SystemException] {
|
||||
$_.Exception.Message;
|
||||
}
|
||||
|
||||
[string[]]$expectedDimensions = ("32x32","48x48","64x64","128x128");
|
||||
|
||||
$message = "Logo Url: $logoUrl Dimensions: $dimension";
|
||||
$requirement = "Must have a logo."
|
||||
$recommendation = "Should be one of these sizes: $expectedDimensions";
|
||||
|
||||
$isExpected = ($expectedDimensions -contains $dimension);
|
||||
|
||||
Test-MultiCondition (!$isEmpty) ($isExpected) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Invoke-UnZip([string]$zipfile, [string]$outpath) {
|
||||
Write-Verbose "Unzip - source: $zipfile"
|
||||
Write-Verbose "Unzip - target: $outpath"
|
||||
Add-Type -assembly "system.io.compression.filesystem"
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
||||
}
|
||||
|
||||
function Start-EvaluateNupkg ($nupkgPath) {
|
||||
Write-Break;
|
||||
Write-Name $nupkgPath;
|
||||
|
||||
Get-IsPackageSigned $nupkgPath;
|
||||
|
||||
|
||||
$unzipPath = $nupkgPath+"_unzip";
|
||||
Remove-Item $unzipPath -Recurse -ErrorAction Ignore
|
||||
$null = Invoke-UnZip $nupkgPath $unzipPath;
|
||||
|
||||
# LOOK FOR ALL NUSPEC WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.nuspec | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
[xml]$nuspecXml = Get-Content $_.FullName
|
||||
Get-IsValidPackageId $nuspecXml;
|
||||
Get-IsValidAuthors $nuspecXml;
|
||||
Get-IsValidOwners $nuspecXml;
|
||||
Get-IsValidProjectUrl $nuspecXml;
|
||||
Get-IsValidLicense $nuspecXml;
|
||||
Get-IsValidLicenseAcceptance $nuspecXml;
|
||||
Get-IsValidCopyright $nuspecXml;
|
||||
Get-IsValidLogoUrl $nuspecXml $unzipPath;
|
||||
Get-IsValidDescription $nuspecXml;
|
||||
Get-IsValidTags $nuspecXml;
|
||||
}
|
||||
|
||||
# LOOK FOR ALL DLL WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.dll | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
Get-IsDllSigned $_.FullName;
|
||||
Get-DoesXmlDocExist $_.FullName;
|
||||
}
|
||||
}
|
||||
|
||||
# LOOK FOR ALL NUPKG IN A DIRECTORY.
|
||||
Get-ChildItem -Path $path -Recurse -Filter *.nupkg -Exclude *.symbols.nupkg |
|
||||
ForEach-Object { Start-EvaluateNupkg $_.FullName }
|
||||
|
||||
$sb.ToString() | Add-Content (Join-Path $path "log.txt");
|
||||
|
||||
if (!$script:isValid){
|
||||
throw "NUPKG or DLL is not valid. Please review log...";
|
||||
}
|
|
@ -1,317 +0,0 @@
|
|||
|
||||
# This script checks the Authoring Requirements listed here:
|
||||
# Full Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/MicrosoftPackages.aspx
|
||||
# Authoring Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/AuthoringRequirements.aspx
|
||||
# Signing Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/SigningMicrosoftPackages.aspx
|
||||
Param(
|
||||
[Parameter(Mandatory=$true,HelpMessage="Path to Artifact files (nupkg):")]
|
||||
[string]
|
||||
$path,
|
||||
[Parameter(Mandatory=$true,HelpMessage="Full Log?:")] #Include Pass with Fail output?
|
||||
[bool]
|
||||
$verboseLog
|
||||
)
|
||||
|
||||
|
||||
$requiredCopyright = "$([char]0x00A9) Microsoft Corporation. All rights reserved.";#"© Microsoft Corporation. All rights reserved.";
|
||||
$expectedProjectUrl = "https://go.microsoft.com/fwlink/?LinkId=392727"; # Application Insights Project Url
|
||||
$expectedLicense = "MIT"; # MIT license SPDX ID
|
||||
$expectedOwner = "AppInsightsSdk"; # Application Insights Nuget Account
|
||||
$expectedTags = @("Azure","Monitoring");
|
||||
|
||||
$sb = [System.Text.StringBuilder]::new();
|
||||
|
||||
$script:isValid = $true;
|
||||
|
||||
|
||||
# Get the latest Nuget.exe from here:
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
|
||||
Write-Host "Nuget.exe not found. Attempting download...";
|
||||
Write-Host "Start time:" (Get-Date -Format G);
|
||||
$downloadNugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe";
|
||||
$saveFile = "$PSScriptRoot\Nuget.exe";
|
||||
(New-Object System.Net.WebClient).DownloadFile($downloadNugetUrl, $saveFile);
|
||||
Write-Host "Finish time:" (Get-Date -Format G);
|
||||
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
throw "Error: Nuget.exe not found! Please download latest from: https://www.nuget.org/downloads";
|
||||
}
|
||||
}
|
||||
|
||||
function Write-Break() {
|
||||
$displayMessage = "========== ========== ========== ========== ==========";
|
||||
Write-Host "";
|
||||
Write-Host $displayMessage;
|
||||
$null = $sb.AppendLine();
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-Name([string]$message) {
|
||||
Write-Host $message;
|
||||
$null = $sb.AppendLine($message);
|
||||
}
|
||||
|
||||
function Write-IsValid ([string]$message) {
|
||||
if ($verboseLog) {
|
||||
$displayMessage = "`tPass:`t$message";
|
||||
Write-Host $displayMessage -ForegroundColor Green;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
}
|
||||
|
||||
function Write-SemiValid ([string]$message, [string]$recommendedDescription) {
|
||||
$displayMessage = "`tReview:`t$message [Recommended: $recommendedDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Yellow;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-NotValid ([string]$message, [string]$requiredDescription) {
|
||||
$displayMessage = "`tFail:`t$message [Required: $requiredDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Red;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
$script:isValid = $false;
|
||||
}
|
||||
|
||||
function Test-Condition ([bool]$condition, [string]$message, [string]$requiredDescription) {
|
||||
if ($condition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Test-MultiCondition ([bool]$requiredCondition, [bool]$recommendedCondition, [string]$message, [string]$requiredDescription, [string]$recommendedDescription) {
|
||||
if ($requiredCondition) {
|
||||
if($recommendedCondition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-SemiValid $message $recommendedDescription
|
||||
}
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsPackageSigned([string]$nupkgPath) {
|
||||
$verifyOutput = "";
|
||||
$null = .\Nuget.exe verify -signature -CertificateFingerprint 3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE $nupkgPath -verbosity detailed 2>&1 | Tee-Object -Variable verifyOutput
|
||||
|
||||
#TEST OUTPUT
|
||||
Write-Host $verifyOutput
|
||||
|
||||
$output = $verifyOutput[$verifyOutput.Length-1]
|
||||
|
||||
$success = ($output -like "Successfully verified*");
|
||||
|
||||
if (!$success){
|
||||
$verifyOutput | Where-Object { $_ -like "NU*" -and $_ -notlike "NUGET*"} | ForEach-Object {
|
||||
$output = "$output $_" -replace "`n","" -replace "`r","";
|
||||
}
|
||||
}
|
||||
|
||||
$message = "Is Signed: $output";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($success) $message $requirement;
|
||||
}
|
||||
|
||||
|
||||
function Get-IsDllSigned ([string]$dllPath) {
|
||||
$test = Get-AuthenticodeSignature $dllPath; # this is equivalent to signtool.exe verify /pa
|
||||
$SignedStatus = $test.Status;
|
||||
$SignatureValid = [System.Management.Automation.SignatureStatus]::Valid;
|
||||
|
||||
$message = "Is Signed: $SignedStatus";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($SignedStatus -eq $SignatureValid) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-DoesXmlDocExist ([string]$dllPath) {
|
||||
# CONFIRM .XML DOCUMENTATION FILE EXISTS WITH EACH DLL
|
||||
[string]$docFile = $dllPath -replace ".dll", ".xml";
|
||||
|
||||
$message = "XML Documentation:";
|
||||
$requirement = "Must exist."
|
||||
Test-Condition (Test-Path $docFile) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidPackageId([xml]$nuspecXml) {
|
||||
$id = $nuspecXml.package.metadata.id;
|
||||
|
||||
$message = "Package Id: $id";
|
||||
$requirement = "Must begin with 'Microsoft.'"
|
||||
|
||||
Test-Condition ($id.StartsWith("Microsoft.")) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidAuthors([xml]$nuspecXml) {
|
||||
$authors = $nuspecXml.package.metadata.authors;
|
||||
|
||||
$message = "Authors: $authors";
|
||||
$requirement = "Microsoft must be the only author.";
|
||||
|
||||
Test-Condition ($authors -eq "Microsoft") $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidOwners([xml]$nuspecXml) {
|
||||
$owners = $nuspecXml.package.metadata.owners;
|
||||
$ownersList = $owners -split ',';
|
||||
|
||||
$message = "Owners: $owners";
|
||||
$requirement = "Must include Microsoft."
|
||||
$recommendation = "Should include nuget owner."
|
||||
|
||||
Test-MultiCondition ($ownersList -contains "Microsoft") ($ownersList -contains $expectedOwner -and $ownersList.Length -eq 2) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidProjectUrl([xml]$nuspecXml) {
|
||||
$projectUrl = $nuspecXml.package.metadata.projectUrl;
|
||||
|
||||
$message = "Project Url: $projectUrl";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($projectUrl -eq $expectedProjectUrl) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicense([xml]$nuspecXml) {
|
||||
$license = $nuspecXml.package.metadata.license.InnerText;
|
||||
|
||||
$message = "License Url: $license";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($license -eq $expectedLicense) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicenseAcceptance([xml]$nuspecXml) {
|
||||
$requireLicenseAcceptance = $nuspecXml.package.metadata.requireLicenseAcceptance;
|
||||
|
||||
$message = "Require License Acceptance: $requireLicenseAcceptance";
|
||||
$requirement = "Not mandatory requirement."
|
||||
$recommendation = "Should require.";
|
||||
|
||||
Test-MultiCondition ($true) ($requireLicenseAcceptance -eq $true) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidCopyright([xml]$nuspecXml) {
|
||||
$copyright = $nuspecXml.package.metadata.copyright;
|
||||
|
||||
$message = "Copyright: $copyright";
|
||||
$requirement = "Must match '$requiredCopyright'";
|
||||
|
||||
Test-Condition ($copyright -eq $requiredCopyright) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidDescription([xml]$nuspecXml) {
|
||||
$description = $nuspecXml.package.metadata.description;
|
||||
$hasDescription = !([System.String]::IsNullOrEmpty($description));
|
||||
|
||||
$message = "Description: $description";
|
||||
$requirement = "Must have a description."
|
||||
|
||||
Test-Condition $hasDescription $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidTags([xml]$nuspecXml) {
|
||||
$tags = $nuspecXml.package.metadata.tags;
|
||||
$hasTags = !([System.String]::IsNullOrEmpty($tags));
|
||||
|
||||
$message = "Tags: $tags";
|
||||
$requirement = "Must have tags."
|
||||
Test-Condition $hasTags $message $requirement;
|
||||
|
||||
$tagsArray = @();
|
||||
if($hasTags) {
|
||||
$tagsArray = $tags -split " ";
|
||||
}
|
||||
|
||||
$expectedTags | ForEach-Object {
|
||||
$hasTag = $tagsArray.Contains($_);
|
||||
$requirement = "Must include tag: $_";
|
||||
Test-Condition $hasTag $message $requirement;
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsValidLogoUrl([xml]$nuspecXml, $path) {
|
||||
$logoUrl = $nuspecXml.package.metadata.iconUrl;
|
||||
$isEmpty = [System.String]::IsNullOrEmpty($logoUrl);
|
||||
$dimension = "";
|
||||
|
||||
try {
|
||||
$filePath = Join-Path $path "logo.png";
|
||||
$wc = New-Object System.Net.WebClient;
|
||||
$wc.DownloadFile($logoUrl, $filePath);
|
||||
add-type -AssemblyName System.Drawing
|
||||
$png = New-Object System.Drawing.Bitmap $filePath
|
||||
$dimension = "$($png.Height)x$($png.Width)";
|
||||
|
||||
# Release lock on png file
|
||||
Remove-Variable png;
|
||||
Remove-Variable wc;
|
||||
} catch [System.SystemException] {
|
||||
$_.Exception.Message;
|
||||
}
|
||||
|
||||
[string[]]$expectedDimensions = ("32x32","48x48","64x64","128x128");
|
||||
|
||||
$message = "Logo Url: $logoUrl Dimensions: $dimension";
|
||||
$requirement = "Must have a logo."
|
||||
$recommendation = "Should be one of these sizes: $expectedDimensions";
|
||||
|
||||
$isExpected = ($expectedDimensions -contains $dimension);
|
||||
|
||||
Test-MultiCondition (!$isEmpty) ($isExpected) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Invoke-UnZip([string]$zipfile, [string]$outpath) {
|
||||
Write-Verbose "Unzip - source: $zipfile"
|
||||
Write-Verbose "Unzip - target: $outpath"
|
||||
Add-Type -assembly "system.io.compression.filesystem"
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
||||
}
|
||||
|
||||
function Start-EvaluateNupkg ($nupkgPath) {
|
||||
Write-Break;
|
||||
Write-Name $nupkgPath;
|
||||
|
||||
Get-IsPackageSigned $nupkgPath;
|
||||
|
||||
|
||||
$unzipPath = $nupkgPath+"_unzip";
|
||||
Remove-Item $unzipPath -Recurse -ErrorAction Ignore
|
||||
$null = Invoke-UnZip $nupkgPath $unzipPath;
|
||||
|
||||
# LOOK FOR ALL NUSPEC WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.nuspec | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
[xml]$nuspecXml = Get-Content $_.FullName
|
||||
Get-IsValidPackageId $nuspecXml;
|
||||
Get-IsValidAuthors $nuspecXml;
|
||||
Get-IsValidOwners $nuspecXml;
|
||||
Get-IsValidProjectUrl $nuspecXml;
|
||||
Get-IsValidLicense $nuspecXml;
|
||||
Get-IsValidLicenseAcceptance $nuspecXml;
|
||||
Get-IsValidCopyright $nuspecXml;
|
||||
Get-IsValidLogoUrl $nuspecXml $unzipPath;
|
||||
Get-IsValidDescription $nuspecXml;
|
||||
Get-IsValidTags $nuspecXml;
|
||||
}
|
||||
|
||||
# LOOK FOR ALL DLL WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.dll | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
Get-IsDllSigned $_.FullName;
|
||||
Get-DoesXmlDocExist $_.FullName;
|
||||
}
|
||||
}
|
||||
|
||||
# LOOK FOR ALL NUPKG IN A DIRECTORY.
|
||||
Get-ChildItem -Path $path -Recurse -Filter *.nupkg -Exclude *.symbols.nupkg |
|
||||
ForEach-Object { Start-EvaluateNupkg $_.FullName }
|
||||
|
||||
$sb.ToString() | Add-Content (Join-Path $path "log.txt");
|
||||
|
||||
if (!$script:isValid){
|
||||
throw "NUPKG or DLL is not valid. Please review log...";
|
||||
}
|
|
@ -1,317 +0,0 @@
|
|||
|
||||
# This script checks the Authoring Requirements listed here:
|
||||
# Full Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/MicrosoftPackages.aspx
|
||||
# Authoring Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/AuthoringRequirements.aspx
|
||||
# Signing Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/SigningMicrosoftPackages.aspx
|
||||
Param(
|
||||
[Parameter(Mandatory=$true,HelpMessage="Path to Artifact files (nupkg):")]
|
||||
[string]
|
||||
$path,
|
||||
[Parameter(Mandatory=$true,HelpMessage="Full Log?:")] #Include Pass with Fail output?
|
||||
[bool]
|
||||
$verboseLog
|
||||
)
|
||||
|
||||
|
||||
$requiredCopyright = "$([char]0x00A9) Microsoft Corporation. All rights reserved.";#"© Microsoft Corporation. All rights reserved.";
|
||||
$expectedProjectUrl = "https://go.microsoft.com/fwlink/?LinkId=392727"; # Application Insights Project Url
|
||||
$expectedLicense = "MIT"; # MIT License SPDX ID
|
||||
$expectedOwner = "AppInsightsSdk"; # Application Insights Nuget Account
|
||||
$expectedTags = @("Azure","Monitoring");
|
||||
|
||||
$sb = [System.Text.StringBuilder]::new();
|
||||
|
||||
$script:isValid = $true;
|
||||
|
||||
|
||||
# Get the latest Nuget.exe from here:
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
|
||||
Write-Host "Nuget.exe not found. Attempting download...";
|
||||
Write-Host "Start time:" (Get-Date -Format G);
|
||||
$downloadNugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe";
|
||||
$saveFile = "$PSScriptRoot\Nuget.exe";
|
||||
(New-Object System.Net.WebClient).DownloadFile($downloadNugetUrl, $saveFile);
|
||||
Write-Host "Finish time:" (Get-Date -Format G);
|
||||
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
throw "Error: Nuget.exe not found! Please download latest from: https://www.nuget.org/downloads";
|
||||
}
|
||||
}
|
||||
|
||||
function Write-Break() {
|
||||
$displayMessage = "========== ========== ========== ========== ==========";
|
||||
Write-Host "";
|
||||
Write-Host $displayMessage;
|
||||
$null = $sb.AppendLine();
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-Name([string]$message) {
|
||||
Write-Host $message;
|
||||
$null = $sb.AppendLine($message);
|
||||
}
|
||||
|
||||
function Write-IsValid ([string]$message) {
|
||||
if ($verboseLog) {
|
||||
$displayMessage = "`tPass:`t$message";
|
||||
Write-Host $displayMessage -ForegroundColor Green;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
}
|
||||
|
||||
function Write-SemiValid ([string]$message, [string]$recommendedDescription) {
|
||||
$displayMessage = "`tReview:`t$message [Recommended: $recommendedDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Yellow;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-NotValid ([string]$message, [string]$requiredDescription) {
|
||||
$displayMessage = "`tFail:`t$message [Required: $requiredDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Red;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
$script:isValid = $false;
|
||||
}
|
||||
|
||||
function Test-Condition ([bool]$condition, [string]$message, [string]$requiredDescription) {
|
||||
if ($condition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Test-MultiCondition ([bool]$requiredCondition, [bool]$recommendedCondition, [string]$message, [string]$requiredDescription, [string]$recommendedDescription) {
|
||||
if ($requiredCondition) {
|
||||
if($recommendedCondition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-SemiValid $message $recommendedDescription
|
||||
}
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsPackageSigned([string]$nupkgPath) {
|
||||
$verifyOutput = "";
|
||||
$null = .\Nuget.exe verify -signature -CertificateFingerprint 3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE $nupkgPath -verbosity detailed 2>&1 | Tee-Object -Variable verifyOutput
|
||||
|
||||
#TEST OUTPUT
|
||||
Write-Host $verifyOutput
|
||||
|
||||
$output = $verifyOutput[$verifyOutput.Length-1]
|
||||
|
||||
$success = ($output -like "Successfully verified*");
|
||||
|
||||
if (!$success){
|
||||
$verifyOutput | Where-Object { $_ -like "NU*" -and $_ -notlike "NUGET*"} | ForEach-Object {
|
||||
$output = "$output $_" -replace "`n","" -replace "`r","";
|
||||
}
|
||||
}
|
||||
|
||||
$message = "Is Signed: $output";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($success) $message $requirement;
|
||||
}
|
||||
|
||||
|
||||
function Get-IsDllSigned ([string]$dllPath) {
|
||||
$test = Get-AuthenticodeSignature $dllPath; # this is equivalent to signtool.exe verify /pa
|
||||
$SignedStatus = $test.Status;
|
||||
$SignatureValid = [System.Management.Automation.SignatureStatus]::Valid;
|
||||
|
||||
$message = "Is Signed: $SignedStatus";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($SignedStatus -eq $SignatureValid) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-DoesXmlDocExist ([string]$dllPath) {
|
||||
# CONFIRM .XML DOCUMENTATION FILE EXISTS WITH EACH DLL
|
||||
[string]$docFile = $dllPath -replace ".dll", ".xml";
|
||||
|
||||
$message = "XML Documentation:";
|
||||
$requirement = "Must exist."
|
||||
Test-Condition (Test-Path $docFile) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidPackageId([xml]$nuspecXml) {
|
||||
$id = $nuspecXml.package.metadata.id;
|
||||
|
||||
$message = "Package Id: $id";
|
||||
$requirement = "Must begin with 'Microsoft.'"
|
||||
|
||||
Test-Condition ($id.StartsWith("Microsoft.")) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidAuthors([xml]$nuspecXml) {
|
||||
$authors = $nuspecXml.package.metadata.authors;
|
||||
|
||||
$message = "Authors: $authors";
|
||||
$requirement = "Microsoft must be the only author.";
|
||||
|
||||
Test-Condition ($authors -eq "Microsoft") $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidOwners([xml]$nuspecXml) {
|
||||
$owners = $nuspecXml.package.metadata.owners;
|
||||
$ownersList = $owners -split ',';
|
||||
|
||||
$message = "Owners: $owners";
|
||||
$requirement = "Must include Microsoft."
|
||||
$recommendation = "Should include nuget owner."
|
||||
|
||||
Test-MultiCondition ($ownersList -contains "Microsoft") ($ownersList -contains $expectedOwner -and $ownersList.Length -eq 2) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidProjectUrl([xml]$nuspecXml) {
|
||||
$projectUrl = $nuspecXml.package.metadata.projectUrl;
|
||||
|
||||
$message = "Project Url: $projectUrl";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($projectUrl -eq $expectedProjectUrl) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicense([xml]$nuspecXml) {
|
||||
$license = $nuspecXml.package.metadata.license.InnerText;
|
||||
|
||||
$message = "License Url: $license";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($license -eq $expectedLicense) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicenseAcceptance([xml]$nuspecXml) {
|
||||
$requireLicenseAcceptance = $nuspecXml.package.metadata.requireLicenseAcceptance;
|
||||
|
||||
$message = "Require License Acceptance: $requireLicenseAcceptance";
|
||||
$requirement = "Not mandatory requirement."
|
||||
$recommendation = "Should require.";
|
||||
|
||||
Test-MultiCondition ($true) ($requireLicenseAcceptance -eq $true) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidCopyright([xml]$nuspecXml) {
|
||||
$copyright = $nuspecXml.package.metadata.copyright;
|
||||
|
||||
$message = "Copyright: $copyright";
|
||||
$requirement = "Must match '$requiredCopyright'";
|
||||
|
||||
Test-Condition ($copyright -eq $requiredCopyright) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidDescription([xml]$nuspecXml) {
|
||||
$description = $nuspecXml.package.metadata.description;
|
||||
$hasDescription = !([System.String]::IsNullOrEmpty($description));
|
||||
|
||||
$message = "Description: $description";
|
||||
$requirement = "Must have a description."
|
||||
|
||||
Test-Condition $hasDescription $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidTags([xml]$nuspecXml) {
|
||||
$tags = $nuspecXml.package.metadata.tags;
|
||||
$hasTags = !([System.String]::IsNullOrEmpty($tags));
|
||||
|
||||
$message = "Tags: $tags";
|
||||
$requirement = "Must have tags."
|
||||
Test-Condition $hasTags $message $requirement;
|
||||
|
||||
$tagsArray = @();
|
||||
if($hasTags) {
|
||||
$tagsArray = $tags -split " ";
|
||||
}
|
||||
|
||||
$expectedTags | ForEach-Object {
|
||||
$hasTag = $tagsArray.Contains($_);
|
||||
$requirement = "Must include tag: $_";
|
||||
Test-Condition $hasTag $message $requirement;
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsValidLogoUrl([xml]$nuspecXml, $path) {
|
||||
$logoUrl = $nuspecXml.package.metadata.iconUrl;
|
||||
$isEmpty = [System.String]::IsNullOrEmpty($logoUrl);
|
||||
$dimension = "";
|
||||
|
||||
try {
|
||||
$filePath = Join-Path $path "logo.png";
|
||||
$wc = New-Object System.Net.WebClient;
|
||||
$wc.DownloadFile($logoUrl, $filePath);
|
||||
add-type -AssemblyName System.Drawing
|
||||
$png = New-Object System.Drawing.Bitmap $filePath
|
||||
$dimension = "$($png.Height)x$($png.Width)";
|
||||
|
||||
# Release lock on png file
|
||||
Remove-Variable png;
|
||||
Remove-Variable wc;
|
||||
} catch [System.SystemException] {
|
||||
$_.Exception.Message;
|
||||
}
|
||||
|
||||
[string[]]$expectedDimensions = ("32x32","48x48","64x64","128x128");
|
||||
|
||||
$message = "Logo Url: $logoUrl Dimensions: $dimension";
|
||||
$requirement = "Must have a logo."
|
||||
$recommendation = "Should be one of these sizes: $expectedDimensions";
|
||||
|
||||
$isExpected = ($expectedDimensions -contains $dimension);
|
||||
|
||||
Test-MultiCondition (!$isEmpty) ($isExpected) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Invoke-UnZip([string]$zipfile, [string]$outpath) {
|
||||
Write-Verbose "Unzip - source: $zipfile"
|
||||
Write-Verbose "Unzip - target: $outpath"
|
||||
Add-Type -assembly "system.io.compression.filesystem"
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
||||
}
|
||||
|
||||
function Start-EvaluateNupkg ($nupkgPath) {
|
||||
Write-Break;
|
||||
Write-Name $nupkgPath;
|
||||
|
||||
Get-IsPackageSigned $nupkgPath;
|
||||
|
||||
|
||||
$unzipPath = $nupkgPath+"_unzip";
|
||||
Remove-Item $unzipPath -Recurse -ErrorAction Ignore
|
||||
$null = Invoke-UnZip $nupkgPath $unzipPath;
|
||||
|
||||
# LOOK FOR ALL NUSPEC WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.nuspec | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
[xml]$nuspecXml = Get-Content $_.FullName
|
||||
Get-IsValidPackageId $nuspecXml;
|
||||
Get-IsValidAuthors $nuspecXml;
|
||||
Get-IsValidOwners $nuspecXml;
|
||||
Get-IsValidProjectUrl $nuspecXml;
|
||||
Get-IsValidLicense $nuspecXml;
|
||||
Get-IsValidLicenseAcceptance $nuspecXml;
|
||||
Get-IsValidCopyright $nuspecXml;
|
||||
Get-IsValidLogoUrl $nuspecXml $unzipPath;
|
||||
Get-IsValidDescription $nuspecXml;
|
||||
Get-IsValidTags $nuspecXml;
|
||||
}
|
||||
|
||||
# LOOK FOR ALL DLL WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.dll | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
Get-IsDllSigned $_.FullName;
|
||||
Get-DoesXmlDocExist $_.FullName;
|
||||
}
|
||||
}
|
||||
|
||||
# LOOK FOR ALL NUPKG IN A DIRECTORY.
|
||||
Get-ChildItem -Path $path -Recurse -Filter *.nupkg -Exclude *.symbols.nupkg |
|
||||
ForEach-Object { Start-EvaluateNupkg $_.FullName }
|
||||
|
||||
$sb.ToString() | Add-Content (Join-Path $path "log.txt");
|
||||
|
||||
if (!$script:isValid){
|
||||
throw "NUPKG or DLL is not valid. Please review log...";
|
||||
}
|
|
@ -0,0 +1,227 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29424.173
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ApplicationInsights", "BASE\src\Microsoft.ApplicationInsights\Microsoft.ApplicationInsights.csproj", "{E3D160E8-7F8C-416F-946F-6FDFC6787461}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelemetryChannel", "BASE\src\ServerTelemetryChannel\TelemetryChannel.csproj", "{C30A7EB8-A86C-49EE-927E-7D9E03572E82}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common.Base", "BASE\src\Common\Common\Common.Base.shproj", "{936AF739-4297-4016-9D70-4280042709BE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyCollector", "WEB\Src\DependencyCollector\DependencyCollector\DependencyCollector.csproj", "{96A6E04E-CEDA-4C30-8ECA-48113382AFBA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventCounterCollector", "WEB\Src\EventCounterCollector\EventCounterCollector\EventCounterCollector.csproj", "{13335EB8-3936-407A-9363-1C428318BEA8}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostingStartup", "WEB\Src\HostingStartup\HostingStartup\HostingStartup.csproj", "{DEEAF599-83F9-4A05-ADD6-F612CDABE570}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Perf", "WEB\Src\PerformanceCollector\PerformanceCollector\Perf.csproj", "{9DC5C5E5-FC37-4E54-81FD-AA42BB934E9B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "WEB\Src\Web\Web\Web.csproj", "{8293BC71-7DDC-4DD1-8807-280EEF7E752D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsServer", "WEB\Src\WindowsServer\WindowsServer\WindowsServer.csproj", "{7B5D95EE-50EE-4222-A03C-FAE5905B3DFD}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common.Web", "WEB\Src\Common\Common.Web.shproj", "{CCAB7A34-8DC5-4A6F-B637-46CEBA93C687}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common.Logging", "LOGGING\src\CommonShared\Common.Logging.shproj", "{587B624B-8C64-498E-93D7-A2D2ABC17EAB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiagnosticSourceListener", "LOGGING\src\DiagnosticSourceListener\DiagnosticSourceListener.csproj", "{2E283031-425B-421F-9E81-34ABFEFAB618}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EtwCollector", "LOGGING\src\EtwCollector\EtwCollector.csproj", "{1B0F54BF-078A-421C-9708-2D817D4BCE30}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "B) ApplicationInsights", "B) ApplicationInsights", "{632FB9CE-540D-4451-9FF2-12E89C1492BD}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "B) TelemetryChannel", "B) TelemetryChannel", "{FBAFD313-0139-4DA3-BCB3-EE54DC3B6CCD}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W) DependencyCollector", "W) DependencyCollector", "{005BD823-60AF-406E-AC20-842D7653FE60}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) DiagnosticSourceListener", "L) DiagnosticSourceListener", "{60CDB555-C5FE-4010-A37B-014B04C5EAC3}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W) PerfCounterCollector", "W) PerfCounterCollector", "{3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W) HostingStartup", "W) HostingStartup", "{7EC1F6B8-9F94-4947-B596-EB3726C53AE0}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W) Web", "W) Web", "{07076842-9CAA-4B4A-8AEF-88DE88CD37AC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W) WindowsServer", "W) WindowsServer", "{11AC7235-167E-40B5-B2E3-9CBF08700064}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) EtwCollector", "L) EtwCollector", "{05E05465-F285-4689-BFC5-F78FC5761992}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W) EventCounterCollector", "W) EventCounterCollector", "{DFCBB4ED-976C-4239-BCAF-8AA21E684E8C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventSourceListener", "LOGGING\src\EventSourceListener\EventSourceListener.csproj", "{52B3C054-C686-4BB8-A4B7-9E8D6C49491F}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) EventSourceListener", "L) EventSourceListener", "{DB0D10AF-7DA5-49CE-B90E-67F896BEED1C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILogger", "LOGGING\src\ILogger\ILogger.csproj", "{67291093-4B5F-4CA5-A811-B8A1DCBE3F1F}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) ILogger", "L) ILogger", "{477A1BA0-0155-404C-A6E0-C2409C0FFE70}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Log4NetAppender", "LOGGING\src\Log4NetAppender\Log4NetAppender.csproj", "{3774003C-91FD-4D79-99C7-9BEAC5B9A48E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) Log4NetAppender", "L) Log4NetAppender", "{DDA01098-8272-4C5A-BB97-BCB4FA65CFE6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NLogTarget", "LOGGING\src\NLogTarget\NLogTarget.csproj", "{63B8FDA7-2FF5-4A20-8DE7-EBB036012A54}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) NLogTarget", "L) NLogTarget", "{39474EE1-28E8-456E-889F-553F129411C8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "L) TraceListener", "L) TraceListener", "{AFEB7CAA-A8BF-4D03-A5CB-BFC5AE378201}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TraceListener", "LOGGING\src\TraceListener\TraceListener.csproj", "{2612AC44-5FF3-4533-B5A5-E5DBF96F5C83}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common.Logging.EventSource", "LOGGING\src\EventSource.Shared\EventSource.Shared\Common.Logging.EventSource.shproj", "{A964DE6D-9750-4013-8BE2-79C2AFC056E5}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ApplicationInsights.AspNetCore", "NETCORE\src\Microsoft.ApplicationInsights.AspNetCore\Microsoft.ApplicationInsights.AspNetCore.csproj", "{AC399F09-B465-4CFD-8D82-F1D1C5C9347E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "C) AspNetCore", "C) AspNetCore", "{E9AEB857-E8AA-4ED6-A020-DF4D8486CEB0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ApplicationInsights.WorkerService", "NETCORE\src\Microsoft.ApplicationInsights.WorkerService\Microsoft.ApplicationInsights.WorkerService.csproj", "{3CAB7F66-3CC4-4B46-9B0D-765C460FE2BF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "C) WorkerService", "C) WorkerService", "{D8483C3E-C386-48AD-B935-700A54FDCF31}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common.NetCore", "NETCORE\src\Shared\Common.NetCore.shproj", "{D56F2979-D6BC-4EF2-BB9B-4077B3290599}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "DependencyCollector.Shared", "WEB\Src\DependencyCollector\Shared\DependencyCollector.Shared.shproj", "{669E7E58-072D-4B0A-A4DD-4EB2AE2EA4D4}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Filtering.Shared", "WEB\Src\PerformanceCollector\Filtering.Shared\Filtering.Shared.shproj", "{568AEB4F-BA4C-47A5-9FA3-68F06CD11FED}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared", "WEB\Src\PerformanceCollector\Perf.Shared\Perf.Shared.shproj", "{A78F50D4-F518-4DCB-878B-526FD54CCA35}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.NetFull", "WEB\Src\PerformanceCollector\Perf.Shared.NetFull\Perf.Shared.NetFull.shproj", "{85238238-5EF0-40FA-AD3E-BD4B12A3DD1A}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.NetStandard", "WEB\Src\PerformanceCollector\Perf.Shared.NetStandard\Perf.Shared.NetStandard.shproj", "{D13C3EC7-B300-4158-9054-216156B203BE}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.NetStandard20", "WEB\Src\PerformanceCollector\Perf.Shared.NetStandard20\Perf.Shared.NetStandard20.shproj", "{A8BA3BD0-19CE-488D-B2BD-0B9B677F4E03}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Perf.Shared.NetStandard20Net45", "WEB\Src\PerformanceCollector\Perf.Shared.NetStandard20Net45\Perf.Shared.NetStandard20Net45.shproj", "{054C25DC-E545-4712-95C4-81F30CF65CE8}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Web.Shared", "WEB\Src\Web\Web.Shared.Net\Web.Shared.shproj", "{395E03BB-D061-4C9D-9D47-18676566444D}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "WindowsServer.Shared", "WEB\Src\WindowsServer\WindowsServer.Shared\WindowsServer.Shared.shproj", "{579F42E8-B711-411E-BE52-4A3FD208507F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
WEB\Src\PerformanceCollector\Perf.Shared.NetStandard20Net45\Perf.Shared.NetStandard20Net45.projitems*{054c25dc-e545-4712-95c4-81f30cf65ce8}*SharedItemsImports = 13
|
||||
WEB\Src\Web\Web.Shared.Net\Web.Shared.Net.projitems*{395e03bb-d061-4c9d-9d47-18676566444d}*SharedItemsImports = 13
|
||||
WEB\Src\PerformanceCollector\Filtering.Shared\Filtering.Shared.projitems*{568aeb4f-ba4c-47a5-9fa3-68f06cd11fed}*SharedItemsImports = 13
|
||||
WEB\Src\WindowsServer\WindowsServer.Shared\WindowsServer.Shared.projitems*{579f42e8-b711-411e-be52-4a3fd208507f}*SharedItemsImports = 13
|
||||
LOGGING\src\CommonShared\CommonShared.projitems*{587b624b-8c64-498e-93d7-a2d2abc17eab}*SharedItemsImports = 13
|
||||
WEB\Src\DependencyCollector\Shared\DependencyCollector.Shared.projitems*{669e7e58-072d-4b0a-a4dd-4eb2ae2ea4d4}*SharedItemsImports = 13
|
||||
WEB\Src\PerformanceCollector\Perf.Shared.NetFull\Perf.Shared.NetFull.projitems*{85238238-5ef0-40fa-ad3e-bd4b12a3dd1a}*SharedItemsImports = 13
|
||||
BASE\src\Common\Common\Common.projitems*{936af739-4297-4016-9d70-4280042709be}*SharedItemsImports = 13
|
||||
WEB\Src\PerformanceCollector\Perf.Shared\Perf.Shared.projitems*{a78f50d4-f518-4dcb-878b-526fd54cca35}*SharedItemsImports = 13
|
||||
WEB\Src\PerformanceCollector\Perf.Shared.NetStandard20\Perf.Shared.NetStandard20.projitems*{a8ba3bd0-19ce-488d-b2bd-0b9b677f4e03}*SharedItemsImports = 13
|
||||
LOGGING\src\EventSource.Shared\EventSource.Shared\EventSource.Shared.projitems*{a964de6d-9750-4013-8be2-79c2afc056e5}*SharedItemsImports = 13
|
||||
WEB\Src\Common\Common.projitems*{ccab7a34-8dc5-4a6f-b637-46ceba93c687}*SharedItemsImports = 13
|
||||
WEB\Src\PerformanceCollector\Perf.Shared.NetStandard\Perf.Shared.NetStandard.projitems*{d13c3ec7-b300-4158-9054-216156b203be}*SharedItemsImports = 13
|
||||
NETCORE\src\Shared\Shared.projitems*{d56f2979-d6bc-4ef2-bb9b-4077b3290599}*SharedItemsImports = 13
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E3D160E8-7F8C-416F-946F-6FDFC6787461}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E3D160E8-7F8C-416F-946F-6FDFC6787461}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E3D160E8-7F8C-416F-946F-6FDFC6787461}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E3D160E8-7F8C-416F-946F-6FDFC6787461}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C30A7EB8-A86C-49EE-927E-7D9E03572E82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C30A7EB8-A86C-49EE-927E-7D9E03572E82}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C30A7EB8-A86C-49EE-927E-7D9E03572E82}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C30A7EB8-A86C-49EE-927E-7D9E03572E82}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{96A6E04E-CEDA-4C30-8ECA-48113382AFBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{96A6E04E-CEDA-4C30-8ECA-48113382AFBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{96A6E04E-CEDA-4C30-8ECA-48113382AFBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{96A6E04E-CEDA-4C30-8ECA-48113382AFBA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{13335EB8-3936-407A-9363-1C428318BEA8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{13335EB8-3936-407A-9363-1C428318BEA8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{13335EB8-3936-407A-9363-1C428318BEA8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{13335EB8-3936-407A-9363-1C428318BEA8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DEEAF599-83F9-4A05-ADD6-F612CDABE570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DEEAF599-83F9-4A05-ADD6-F612CDABE570}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DEEAF599-83F9-4A05-ADD6-F612CDABE570}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DEEAF599-83F9-4A05-ADD6-F612CDABE570}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9DC5C5E5-FC37-4E54-81FD-AA42BB934E9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9DC5C5E5-FC37-4E54-81FD-AA42BB934E9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9DC5C5E5-FC37-4E54-81FD-AA42BB934E9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9DC5C5E5-FC37-4E54-81FD-AA42BB934E9B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8293BC71-7DDC-4DD1-8807-280EEF7E752D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8293BC71-7DDC-4DD1-8807-280EEF7E752D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8293BC71-7DDC-4DD1-8807-280EEF7E752D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8293BC71-7DDC-4DD1-8807-280EEF7E752D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7B5D95EE-50EE-4222-A03C-FAE5905B3DFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7B5D95EE-50EE-4222-A03C-FAE5905B3DFD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7B5D95EE-50EE-4222-A03C-FAE5905B3DFD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7B5D95EE-50EE-4222-A03C-FAE5905B3DFD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2E283031-425B-421F-9E81-34ABFEFAB618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2E283031-425B-421F-9E81-34ABFEFAB618}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2E283031-425B-421F-9E81-34ABFEFAB618}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E283031-425B-421F-9E81-34ABFEFAB618}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1B0F54BF-078A-421C-9708-2D817D4BCE30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1B0F54BF-078A-421C-9708-2D817D4BCE30}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1B0F54BF-078A-421C-9708-2D817D4BCE30}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1B0F54BF-078A-421C-9708-2D817D4BCE30}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{52B3C054-C686-4BB8-A4B7-9E8D6C49491F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{52B3C054-C686-4BB8-A4B7-9E8D6C49491F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{52B3C054-C686-4BB8-A4B7-9E8D6C49491F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{52B3C054-C686-4BB8-A4B7-9E8D6C49491F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{67291093-4B5F-4CA5-A811-B8A1DCBE3F1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{67291093-4B5F-4CA5-A811-B8A1DCBE3F1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{67291093-4B5F-4CA5-A811-B8A1DCBE3F1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{67291093-4B5F-4CA5-A811-B8A1DCBE3F1F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3774003C-91FD-4D79-99C7-9BEAC5B9A48E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3774003C-91FD-4D79-99C7-9BEAC5B9A48E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3774003C-91FD-4D79-99C7-9BEAC5B9A48E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3774003C-91FD-4D79-99C7-9BEAC5B9A48E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{63B8FDA7-2FF5-4A20-8DE7-EBB036012A54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{63B8FDA7-2FF5-4A20-8DE7-EBB036012A54}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{63B8FDA7-2FF5-4A20-8DE7-EBB036012A54}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{63B8FDA7-2FF5-4A20-8DE7-EBB036012A54}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2612AC44-5FF3-4533-B5A5-E5DBF96F5C83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2612AC44-5FF3-4533-B5A5-E5DBF96F5C83}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2612AC44-5FF3-4533-B5A5-E5DBF96F5C83}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2612AC44-5FF3-4533-B5A5-E5DBF96F5C83}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AC399F09-B465-4CFD-8D82-F1D1C5C9347E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AC399F09-B465-4CFD-8D82-F1D1C5C9347E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC399F09-B465-4CFD-8D82-F1D1C5C9347E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC399F09-B465-4CFD-8D82-F1D1C5C9347E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3CAB7F66-3CC4-4B46-9B0D-765C460FE2BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3CAB7F66-3CC4-4B46-9B0D-765C460FE2BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3CAB7F66-3CC4-4B46-9B0D-765C460FE2BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3CAB7F66-3CC4-4B46-9B0D-765C460FE2BF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{E3D160E8-7F8C-416F-946F-6FDFC6787461} = {632FB9CE-540D-4451-9FF2-12E89C1492BD}
|
||||
{C30A7EB8-A86C-49EE-927E-7D9E03572E82} = {FBAFD313-0139-4DA3-BCB3-EE54DC3B6CCD}
|
||||
{96A6E04E-CEDA-4C30-8ECA-48113382AFBA} = {005BD823-60AF-406E-AC20-842D7653FE60}
|
||||
{13335EB8-3936-407A-9363-1C428318BEA8} = {DFCBB4ED-976C-4239-BCAF-8AA21E684E8C}
|
||||
{DEEAF599-83F9-4A05-ADD6-F612CDABE570} = {7EC1F6B8-9F94-4947-B596-EB3726C53AE0}
|
||||
{9DC5C5E5-FC37-4E54-81FD-AA42BB934E9B} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
|
||||
{8293BC71-7DDC-4DD1-8807-280EEF7E752D} = {07076842-9CAA-4B4A-8AEF-88DE88CD37AC}
|
||||
{7B5D95EE-50EE-4222-A03C-FAE5905B3DFD} = {11AC7235-167E-40B5-B2E3-9CBF08700064}
|
||||
{2E283031-425B-421F-9E81-34ABFEFAB618} = {60CDB555-C5FE-4010-A37B-014B04C5EAC3}
|
||||
{1B0F54BF-078A-421C-9708-2D817D4BCE30} = {05E05465-F285-4689-BFC5-F78FC5761992}
|
||||
{52B3C054-C686-4BB8-A4B7-9E8D6C49491F} = {DB0D10AF-7DA5-49CE-B90E-67F896BEED1C}
|
||||
{67291093-4B5F-4CA5-A811-B8A1DCBE3F1F} = {477A1BA0-0155-404C-A6E0-C2409C0FFE70}
|
||||
{3774003C-91FD-4D79-99C7-9BEAC5B9A48E} = {DDA01098-8272-4C5A-BB97-BCB4FA65CFE6}
|
||||
{63B8FDA7-2FF5-4A20-8DE7-EBB036012A54} = {39474EE1-28E8-456E-889F-553F129411C8}
|
||||
{2612AC44-5FF3-4533-B5A5-E5DBF96F5C83} = {AFEB7CAA-A8BF-4D03-A5CB-BFC5AE378201}
|
||||
{AC399F09-B465-4CFD-8D82-F1D1C5C9347E} = {E9AEB857-E8AA-4ED6-A020-DF4D8486CEB0}
|
||||
{3CAB7F66-3CC4-4B46-9B0D-765C460FE2BF} = {D8483C3E-C386-48AD-B935-700A54FDCF31}
|
||||
{669E7E58-072D-4B0A-A4DD-4EB2AE2EA4D4} = {005BD823-60AF-406E-AC20-842D7653FE60}
|
||||
{568AEB4F-BA4C-47A5-9FA3-68F06CD11FED} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
|
||||
{A78F50D4-F518-4DCB-878B-526FD54CCA35} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
|
||||
{85238238-5EF0-40FA-AD3E-BD4B12A3DD1A} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
|
||||
{D13C3EC7-B300-4158-9054-216156B203BE} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
|
||||
{A8BA3BD0-19CE-488D-B2BD-0B9B677F4E03} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
|
||||
{054C25DC-E545-4712-95C4-81F30CF65CE8} = {3EDBC945-E531-4CEE-A038-A6AE1EF9AA96}
|
||||
{395E03BB-D061-4C9D-9D47-18676566444D} = {07076842-9CAA-4B4A-8AEF-88DE88CD37AC}
|
||||
{579F42E8-B711-411E-BE52-4A3FD208507F} = {11AC7235-167E-40B5-B2E3-9CBF08700064}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0E0415AF-37CC-4999-8E5B-DD36F75BFD4D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,317 +0,0 @@
|
|||
|
||||
# This script checks the Authoring Requirements listed here:
|
||||
# Full Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/MicrosoftPackages.aspx
|
||||
# Authoring Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/AuthoringRequirements.aspx
|
||||
# Signing Requirements: https://microsoft.sharepoint.com/teams/NuGet/MicrosoftWiki/SigningMicrosoftPackages.aspx
|
||||
Param(
|
||||
[Parameter(Mandatory=$true,HelpMessage="Path to Artifact files (nupkg):")]
|
||||
[string]
|
||||
$path,
|
||||
[Parameter(Mandatory=$true,HelpMessage="Full Log?:")] #Include Pass with Fail output?
|
||||
[bool]
|
||||
$verboseLog
|
||||
)
|
||||
|
||||
|
||||
$requiredCopyright = "$([char]0x00A9) Microsoft Corporation. All rights reserved.";#"© Microsoft Corporation. All rights reserved.";
|
||||
$expectedProjectUrl = "https://go.microsoft.com/fwlink/?LinkId=392727"; # Application Insights Project Url
|
||||
$expectedLicense = "MIT"; # MIT license SPDX ID
|
||||
$expectedOwner = "AppInsightsSdk"; # Application Insights Nuget Account
|
||||
$expectedTags = @("Azure","Monitoring");
|
||||
|
||||
$sb = [System.Text.StringBuilder]::new();
|
||||
|
||||
$script:isValid = $true;
|
||||
|
||||
|
||||
# Get the latest Nuget.exe from here:
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
|
||||
Write-Host "Nuget.exe not found. Attempting download...";
|
||||
Write-Host "Start time:" (Get-Date -Format G);
|
||||
$downloadNugetUrl = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe";
|
||||
$saveFile = "$PSScriptRoot\Nuget.exe";
|
||||
(New-Object System.Net.WebClient).DownloadFile($downloadNugetUrl, $saveFile);
|
||||
Write-Host "Finish time:" (Get-Date -Format G);
|
||||
|
||||
if (!(Test-Path ".\Nuget.exe")) {
|
||||
throw "Error: Nuget.exe not found! Please download latest from: https://www.nuget.org/downloads";
|
||||
}
|
||||
}
|
||||
|
||||
function Write-Break() {
|
||||
$displayMessage = "========== ========== ========== ========== ==========";
|
||||
Write-Host "";
|
||||
Write-Host $displayMessage;
|
||||
$null = $sb.AppendLine();
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-Name([string]$message) {
|
||||
Write-Host $message;
|
||||
$null = $sb.AppendLine($message);
|
||||
}
|
||||
|
||||
function Write-IsValid ([string]$message) {
|
||||
if ($verboseLog) {
|
||||
$displayMessage = "`tPass:`t$message";
|
||||
Write-Host $displayMessage -ForegroundColor Green;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
}
|
||||
|
||||
function Write-SemiValid ([string]$message, [string]$recommendedDescription) {
|
||||
$displayMessage = "`tReview:`t$message [Recommended: $recommendedDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Yellow;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
}
|
||||
|
||||
function Write-NotValid ([string]$message, [string]$requiredDescription) {
|
||||
$displayMessage = "`tFail:`t$message [Required: $requiredDescription]";
|
||||
Write-Host $displayMessage -ForegroundColor Red;
|
||||
$null = $sb.AppendLine($displayMessage);
|
||||
$script:isValid = $false;
|
||||
}
|
||||
|
||||
function Test-Condition ([bool]$condition, [string]$message, [string]$requiredDescription) {
|
||||
if ($condition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Test-MultiCondition ([bool]$requiredCondition, [bool]$recommendedCondition, [string]$message, [string]$requiredDescription, [string]$recommendedDescription) {
|
||||
if ($requiredCondition) {
|
||||
if($recommendedCondition) {
|
||||
Write-IsValid $message
|
||||
} else {
|
||||
Write-SemiValid $message $recommendedDescription
|
||||
}
|
||||
} else {
|
||||
Write-NotValid $message $requiredDescription
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsPackageSigned([string]$nupkgPath) {
|
||||
$verifyOutput = "";
|
||||
$null = .\Nuget.exe verify -signature -CertificateFingerprint 3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE $nupkgPath -verbosity detailed 2>&1 | Tee-Object -Variable verifyOutput
|
||||
|
||||
#TEST OUTPUT
|
||||
Write-Host $verifyOutput
|
||||
|
||||
$output = $verifyOutput[$verifyOutput.Length-1]
|
||||
|
||||
$success = ($output -like "Successfully verified*");
|
||||
|
||||
if (!$success){
|
||||
$verifyOutput | Where-Object { $_ -like "NU*" -and $_ -notlike "NUGET*"} | ForEach-Object {
|
||||
$output = "$output $_" -replace "`n","" -replace "`r","";
|
||||
}
|
||||
}
|
||||
|
||||
$message = "Is Signed: $output";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($success) $message $requirement;
|
||||
}
|
||||
|
||||
|
||||
function Get-IsDllSigned ([string]$dllPath) {
|
||||
$test = Get-AuthenticodeSignature $dllPath; # this is equivalent to signtool.exe verify /pa
|
||||
$SignedStatus = $test.Status;
|
||||
$SignatureValid = [System.Management.Automation.SignatureStatus]::Valid;
|
||||
|
||||
$message = "Is Signed: $SignedStatus";
|
||||
$requirement = "Must be signed."
|
||||
|
||||
Test-Condition ($SignedStatus -eq $SignatureValid) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-DoesXmlDocExist ([string]$dllPath) {
|
||||
# CONFIRM .XML DOCUMENTATION FILE EXISTS WITH EACH DLL
|
||||
[string]$docFile = $dllPath -replace ".dll", ".xml";
|
||||
|
||||
$message = "XML Documentation:";
|
||||
$requirement = "Must exist."
|
||||
Test-Condition (Test-Path $docFile) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidPackageId([xml]$nuspecXml) {
|
||||
$id = $nuspecXml.package.metadata.id;
|
||||
|
||||
$message = "Package Id: $id";
|
||||
$requirement = "Must begin with 'Microsoft.'"
|
||||
|
||||
Test-Condition ($id.StartsWith("Microsoft.")) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidAuthors([xml]$nuspecXml) {
|
||||
$authors = $nuspecXml.package.metadata.authors;
|
||||
|
||||
$message = "Authors: $authors";
|
||||
$requirement = "Microsoft must be the only author.";
|
||||
|
||||
Test-Condition ($authors -eq "Microsoft") $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidOwners([xml]$nuspecXml) {
|
||||
$owners = $nuspecXml.package.metadata.owners;
|
||||
$ownersList = $owners -split ',';
|
||||
|
||||
$message = "Owners: $owners";
|
||||
$requirement = "Must include Microsoft."
|
||||
$recommendation = "Should include nuget owner."
|
||||
|
||||
Test-MultiCondition ($ownersList -contains "Microsoft") ($ownersList -contains $expectedOwner -and $ownersList.Length -eq 2) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidProjectUrl([xml]$nuspecXml) {
|
||||
$projectUrl = $nuspecXml.package.metadata.projectUrl;
|
||||
|
||||
$message = "Project Url: $projectUrl";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($projectUrl -eq $expectedProjectUrl) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicense([xml]$nuspecXml) {
|
||||
$license = $nuspecXml.package.metadata.license.InnerText;
|
||||
|
||||
$message = "License: $license";
|
||||
$requirement = "Must match expected."
|
||||
|
||||
Test-Condition ($license -eq $expectedLicense) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidLicenseAcceptance([xml]$nuspecXml) {
|
||||
$requireLicenseAcceptance = $nuspecXml.package.metadata.requireLicenseAcceptance;
|
||||
|
||||
$message = "Require License Acceptance: $requireLicenseAcceptance";
|
||||
$requirement = "Not mandatory requirement."
|
||||
$recommendation = "Should require.";
|
||||
|
||||
Test-MultiCondition ($true) ($requireLicenseAcceptance -eq $true) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Get-IsValidCopyright([xml]$nuspecXml) {
|
||||
$copyright = $nuspecXml.package.metadata.copyright;
|
||||
|
||||
$message = "Copyright: $copyright";
|
||||
$requirement = "Must match '$requiredCopyright'";
|
||||
|
||||
Test-Condition ($copyright -eq $requiredCopyright) $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidDescription([xml]$nuspecXml) {
|
||||
$description = $nuspecXml.package.metadata.description;
|
||||
$hasDescription = !([System.String]::IsNullOrEmpty($description));
|
||||
|
||||
$message = "Description: $description";
|
||||
$requirement = "Must have a description."
|
||||
|
||||
Test-Condition $hasDescription $message $requirement;
|
||||
}
|
||||
|
||||
function Get-IsValidTags([xml]$nuspecXml) {
|
||||
$tags = $nuspecXml.package.metadata.tags;
|
||||
$hasTags = !([System.String]::IsNullOrEmpty($tags));
|
||||
|
||||
$message = "Tags: $tags";
|
||||
$requirement = "Must have tags."
|
||||
Test-Condition $hasTags $message $requirement;
|
||||
|
||||
$tagsArray = @();
|
||||
if($hasTags) {
|
||||
$tagsArray = $tags -split " ";
|
||||
}
|
||||
|
||||
$expectedTags | ForEach-Object {
|
||||
$hasTag = $tagsArray.Contains($_);
|
||||
$requirement = "Must include tag: $_";
|
||||
Test-Condition $hasTag $message $requirement;
|
||||
}
|
||||
}
|
||||
|
||||
function Get-IsValidLogoUrl([xml]$nuspecXml, $path) {
|
||||
$logoUrl = $nuspecXml.package.metadata.iconUrl;
|
||||
$isEmpty = [System.String]::IsNullOrEmpty($logoUrl);
|
||||
$dimension = "";
|
||||
|
||||
try {
|
||||
$filePath = Join-Path $path "logo.png";
|
||||
$wc = New-Object System.Net.WebClient;
|
||||
$wc.DownloadFile($logoUrl, $filePath);
|
||||
add-type -AssemblyName System.Drawing
|
||||
$png = New-Object System.Drawing.Bitmap $filePath
|
||||
$dimension = "$($png.Height)x$($png.Width)";
|
||||
|
||||
# Release lock on png file
|
||||
Remove-Variable png;
|
||||
Remove-Variable wc;
|
||||
} catch [System.SystemException] {
|
||||
$_.Exception.Message;
|
||||
}
|
||||
|
||||
[string[]]$expectedDimensions = ("32x32","48x48","64x64","128x128");
|
||||
|
||||
$message = "Logo Url: $logoUrl Dimensions: $dimension";
|
||||
$requirement = "Must have a logo."
|
||||
$recommendation = "Should be one of these sizes: $expectedDimensions";
|
||||
|
||||
$isExpected = ($expectedDimensions -contains $dimension);
|
||||
|
||||
Test-MultiCondition (!$isEmpty) ($isExpected) $message $requirement $recommendation;
|
||||
}
|
||||
|
||||
function Invoke-UnZip([string]$zipfile, [string]$outpath) {
|
||||
Write-Verbose "Unzip - source: $zipfile"
|
||||
Write-Verbose "Unzip - target: $outpath"
|
||||
Add-Type -assembly "system.io.compression.filesystem"
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
|
||||
}
|
||||
|
||||
function Start-EvaluateNupkg ($nupkgPath) {
|
||||
Write-Break;
|
||||
Write-Name $nupkgPath;
|
||||
|
||||
Get-IsPackageSigned $nupkgPath;
|
||||
|
||||
|
||||
$unzipPath = $nupkgPath+"_unzip";
|
||||
Remove-Item $unzipPath -Recurse -ErrorAction Ignore
|
||||
$null = Invoke-UnZip $nupkgPath $unzipPath;
|
||||
|
||||
# LOOK FOR ALL NUSPEC WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.nuspec | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
[xml]$nuspecXml = Get-Content $_.FullName
|
||||
Get-IsValidPackageId $nuspecXml;
|
||||
Get-IsValidAuthors $nuspecXml;
|
||||
Get-IsValidOwners $nuspecXml;
|
||||
Get-IsValidProjectUrl $nuspecXml;
|
||||
Get-IsValidLicense $nuspecXml;
|
||||
Get-IsValidLicenseAcceptance $nuspecXml;
|
||||
Get-IsValidCopyright $nuspecXml;
|
||||
Get-IsValidLogoUrl $nuspecXml $unzipPath;
|
||||
Get-IsValidDescription $nuspecXml;
|
||||
Get-IsValidTags $nuspecXml;
|
||||
}
|
||||
|
||||
# LOOK FOR ALL DLL WITHIN NUPKG
|
||||
Get-ChildItem -Path $unzipPath -Recurse -Filter *.dll | ForEach-Object {
|
||||
Write-Name $_.FullName;
|
||||
Get-IsDllSigned $_.FullName;
|
||||
Get-DoesXmlDocExist $_.FullName;
|
||||
}
|
||||
}
|
||||
|
||||
# LOOK FOR ALL NUPKG IN A DIRECTORY.
|
||||
Get-ChildItem -Path $path -Recurse -Filter *.nupkg -Exclude *.symbols.nupkg |
|
||||
ForEach-Object { Start-EvaluateNupkg $_.FullName }
|
||||
|
||||
$sb.ToString() | Add-Content (Join-Path $path "log.txt");
|
||||
|
||||
if (!$script:isValid){
|
||||
throw "NUPKG or DLL is not valid. Please review log...";
|
||||
}
|
Загрузка…
Ссылка в новой задаче