Skip to content

Commit 5c1ea4a

Browse files
Jean-Marc PrieurBrent Schmaltz
Jean-Marc Prieur
authored and
Brent Schmaltz
committed
Merged PR 10241: Update dev to fix the release build
#### AI-Generated Description This pull request introduces the following changes: - Adds `System.Runtime.InteropServices` namespace to several test projects to use `RuntimeInformation` class. - Adds conditional logic to skip or run some tests based on the operating system platform, since some features are not supported on Linux or OSX. - Removes the `apiCompat.ps1` script and the `apiCompat.props` file that were used for API compatibility checks. - Adds the `EnablePackageValidation` property and the `PackageValidationBaselineVersion` property to the `common.props` file to enable package validation checks. - Comments out the `VerifyResourceUsage.pl` script invocation in the `build.ps1` file.
1 parent ec25d19 commit 5c1ea4a

15 files changed

+83
-459
lines changed

build.ps1

Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ param(
55
[string]$root=$PSScriptRoot,
66
[string]$runTests="YES",
77
[string]$failBuildOnTest="YES",
8-
[string]$slnFile="wilson.sln",
9-
[switch]$runApiCompat,
10-
[switch]$generateContractAssemblies)
8+
[string]$slnFile="wilson.sln"
9+
)
1110

1211
################################################# Functions ############################################################
1312

@@ -47,21 +46,6 @@ function CreateArtifactsRoot($folder)
4746
mkdir $folder | Out-Null
4847
}
4948

50-
function GenerateContractAssemblies($root)
51-
{
52-
# clear content of baseline files as it is not relevant for the next version
53-
ClearBaselineFiles($root)
54-
55-
# execute generateContractAssemblies script
56-
& "$root\generateContractAssemblies.ps1".
57-
}
58-
59-
function ClearBaselineFiles($root)
60-
{
61-
Write-Host ">>> Clear-Content $root\Tools\apiCompat\baseline\*.txt"
62-
Clear-Content $root\Tools\apiCompat\baseline\*.txt
63-
}
64-
6549
################################################# Functions ############################################################
6650

6751
if ($env:VSINSTALLDIR)
@@ -79,8 +63,6 @@ Write-Host "root: " $root;
7963
Write-Host "runTests: " $runTests;
8064
Write-Host "failBuildOnTest: " $failBuildOnTest;
8165
Write-Host "slnFile: " $slnFile;
82-
Write-Host "runApiCompat: " $runApiCompat;
83-
Write-Host "generateContractAssemblies: " $generateContractAssemblies;
8466
WriteSectionFooter("End build.ps1 - parameters");
8567

8668
[xml]$buildConfiguration = Get-Content $PSScriptRoot\buildConfiguration.xml
@@ -105,17 +87,17 @@ WriteSectionFooter("End Environment");
10587

10688
$ErrorActionPreference = "Stop"
10789

108-
WriteSectionHeader("VerifyResourceUsage.pl");
90+
WriteSectionHeader("VerifyResourceUsage.pl");
10991

110-
Write-Host ">>> Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl"
111-
$verifyResourceUsageResult = Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl
92+
Write-Host ">>> Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl"
93+
$verifyResourceUsageResult = Start-Process -Wait -PassThru -NoNewWindow perl $root\src\VerifyResourceUsage.pl
11294

113-
if($verifyResourceUsageResult.ExitCode -ne 0)
114-
{
115-
throw "VerifyResourceUsage.pl failed."
116-
}
95+
if($verifyResourceUsageResult.ExitCode -ne 0)
96+
{
97+
throw "VerifyResourceUsage.pl failed."
98+
}
11799

118-
WriteSectionFooter("End VerifyResourceUsage.pl");
100+
WriteSectionFooter("End VerifyResourceUsage.pl");
119101

120102
WriteSectionHeader("Build");
121103

@@ -138,24 +120,17 @@ CreateArtifactsRoot($artifactsRoot);
138120
pushd
139121
Set-Location $root
140122
Write-Host ""
141-
Write-Host ">>> Start-Process -wait -NoNewWindow $msbuildexe /restore:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType /p:RunApiCompat=$runApiCompat $slnFile"
123+
Write-Host ">>> Start-Process -wait -NoNewWindow $msbuildexe /restore:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType $slnFile"
142124
Write-Host ""
143125
Write-Host "msbuildexe: " $msbuildexe
144-
$p = Start-Process -Wait -PassThru -NoNewWindow $msbuildexe "/r:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType /p:RunApiCompat=$runApiCompat $slnFile"
126+
$p = Start-Process -Wait -PassThru -NoNewWindow $msbuildexe "/r:True /p:UseSharedCompilation=false /nr:false /verbosity:m /p:Configuration=$buildType $slnFile"
145127

146128
if($p.ExitCode -ne 0)
147129
{
148130
throw "Build failed."
149131
}
150132
popd
151133

152-
if ($generateContractAssemblies.IsPresent)
153-
{
154-
WriteSectionHeader("Generating Contract Assemblies");
155-
GenerateContractAssemblies($root);
156-
WriteSectionFooter("End Generating Contract Assemblies");
157-
}
158-
159134
foreach($project in $buildConfiguration.SelectNodes("root/projects/src/project"))
160135
{
161136
$name = $project.name;

build/apiCompat.props

Lines changed: 0 additions & 49 deletions
This file was deleted.

build/apiCompat.ps1

Lines changed: 0 additions & 224 deletions
This file was deleted.

build/common.props

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<Project>
22

3-
<Import Project="apiCompat.props" />
43
<Import Project="dependencies.props" />
54
<Import Project="targets.props" />
65
<Import Project="version.props" />
@@ -35,6 +34,11 @@
3534
<LangVersion>11</LangVersion>
3635
</PropertyGroup>
3736

37+
<PropertyGroup>
38+
<EnablePackageValidation>true</EnablePackageValidation>
39+
<PackageValidationBaselineVersion>7.0.0</PackageValidationBaselineVersion>
40+
</PropertyGroup>
41+
3842
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
3943
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
4044
</PropertyGroup>

0 commit comments

Comments
 (0)