diff --git a/NuGet.Config b/NuGet.Config index 5832a9da27..e416486706 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -2,6 +2,6 @@ - + diff --git a/build.ps1 b/build.ps1 index 1d0b808590..d47148f175 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,9 +5,8 @@ param( [string]$root=$PSScriptRoot, [string]$runTests="YES", [string]$failBuildOnTest="YES", - [string]$slnFile="wilson.sln", - [switch]$runApiCompat, - [switch]$generateContractAssemblies) + [string]$slnFile="wilson.sln" +) ################################################# Functions ############################################################ @@ -47,21 +46,6 @@ function CreateArtifactsRoot($folder) mkdir $folder | Out-Null } -function GenerateContractAssemblies($root) -{ - # clear content of baseline files as it is not relevant for the next version - ClearBaselineFiles($root) - - # execute generateContractAssemblies script - & "$root\generateContractAssemblies.ps1". -} - -function ClearBaselineFiles($root) -{ - Write-Host ">>> Clear-Content $root\Tools\apiCompat\baseline\*.txt" - Clear-Content $root\Tools\apiCompat\baseline\*.txt -} - ################################################# Functions ############################################################ if ($env:VSINSTALLDIR) @@ -79,8 +63,6 @@ Write-Host "root: " $root; Write-Host "runTests: " $runTests; Write-Host "failBuildOnTest: " $failBuildOnTest; Write-Host "slnFile: " $slnFile; -Write-Host "runApiCompat: " $runApiCompat; -Write-Host "generateContractAssemblies: " $generateContractAssemblies; WriteSectionFooter("End build.ps1 - parameters"); [xml]$buildConfiguration = Get-Content $PSScriptRoot\buildConfiguration.xml @@ -138,10 +120,10 @@ CreateArtifactsRoot($artifactsRoot); pushd Set-Location $root Write-Host "" -Write-Host ">>> Start-Process -wait -NoNewWindow $msbuildexe /restore:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType /p:RunApiCompat=$runApiCompat $slnFile" +Write-Host ">>> Start-Process -wait -NoNewWindow $msbuildexe /restore:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType $slnFile" Write-Host "" Write-Host "msbuildexe: " $msbuildexe -$p = Start-Process -Wait -PassThru -NoNewWindow $msbuildexe "/r:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType /p:RunApiCompat=$runApiCompat $slnFile" +$p = Start-Process -Wait -PassThru -NoNewWindow $msbuildexe "/r:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType $slnFile" if($p.ExitCode -ne 0) { @@ -149,13 +131,6 @@ if($p.ExitCode -ne 0) } popd -if ($generateContractAssemblies.IsPresent) -{ - WriteSectionHeader("Generating Contract Assemblies"); - GenerateContractAssemblies($root); - WriteSectionFooter("End Generating Contract Assemblies"); -} - foreach($project in $buildConfiguration.SelectNodes("root/projects/src/project")) { $name = $project.name; diff --git a/generateContractAssemblies.ps1 b/generateContractAssemblies.ps1 deleted file mode 100644 index 65f0314d8f..0000000000 --- a/generateContractAssemblies.ps1 +++ /dev/null @@ -1,70 +0,0 @@ -# Generate Contract Assemblies, for each Target Framework, which will be used as reference assemblies during ApiCompat validation -# Directory structure under contractAssemblies will be as following: -# $contractAssembliesPath\{TargetFramework}\{ReferenceAssembly.dll} - -$implementationAssembliesRootPath = "$PSScriptRoot\src" -$contractAssembliesPath = "$PSScriptRoot\Tools\apiCompat\contractAssemblies" - -Write-Host "============================ `n" -Write-Host "implementationAssembliesRootPath: $implementationAssembliesRootPath" -Write-Host "contractAssembliesPath: $contractAssembliesPath `n" - -# remove existing contract assemblies -if (Test-Path $contractAssembliesPath) -{ - Write-Host ">>> Remove-Item -Recurse -Force $contractAssembliesPath" - Remove-Item -Recurse -Force $contractAssembliesPath -} - -# create contractAssembliesDir -Write-Host ">>> mkdir $contractAssembliesPath" -mkdir $contractAssembliesPath | Out-Null - -# recursively iterate implAssembliesRootPath and include DLLs whose name contain 'IdentityModel' -Get-ChildItem $implementationAssembliesRootPath -Recurse -Include '*IdentityModel*.dll' | Foreach-Object ` -{ - # get partialAssemblyName - remove text before the first dot e.g. System.IdentityModel.Tokens.Jwt -> IdentityModel.Tokens.Jwt - # this hack is in place as there are cases when a project is producing an assembly with a name different than its name (special builds) - $null = $_.Name -match "^*\.(?.*).dll$" - $partialAssemblyName = $matches["partialName"] - - # continue if source path [string] of current item (assembly) doesn't contain partialAssemblyName - # we don't want assemblies that don't belong to IdentityModel-extensions solution in contractAssemblies e.g. 'Microsoft.IdentityModel.Clients.ActiveDirectory.dll' - if (!($_.Directory -match $partialAssemblyName)) - { - # think continue; - return - } - - # resolve target framework, destination directory and destination assembly file path - $targetFramework = Split-Path $_.Directory -leaf - $destDir = Join-Path -Path $contractAssembliesPath -ChildPath $targetFramework - $destAssemblyFilePath = Join-Path -Path $destDir -ChildPath $_.Name - - # create directory if it doesn't exist already - if (!(Test-Path $destDir)) - { - Write-Host ">>> New-Item -ItemType directory $destDir | Out-Null" - New-Item -ItemType directory $destDir | Out-Null - } - - # if an assembly with the same name as the current item (assembly) already exists in destination dir - # overwrite it only if curent item's LastWriteTime is greater than LastWriteTime of an existing assembly - if (Test-Path $destAssemblyFilePath) - { - $destAssemblyFile = Get-Item $destAssemblyFilePath - - if ($_.LastWriteTime -gt $destAssemblyFile.LastWriteTime) - { - Write-Host ">>> Copy-Item $_ -Destination $destDir" - Copy-Item $_ -Destination $destDir - } - } - else # copy assembly to destination dir - { - Write-Host ">>> Copy-Item $_ -Destination $destDir" - Copy-Item $_ -Destination $destDir - } -} - -Write-Host "`nDone!`n"