Projektdateien hinzufügen.
This commit is contained in:
7
scripts/build-net48-only.cmd
Normal file
7
scripts/build-net48-only.cmd
Normal file
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
setlocal
|
||||
cd /d "%~dp0.."
|
||||
dotnet restore src\IMSApiDotNet\IMSApiDotNet.Net48.csproj
|
||||
if errorlevel 1 exit /b %errorlevel%
|
||||
dotnet build src\IMSApiDotNet\IMSApiDotNet.Net48.csproj -c Release --no-restore
|
||||
exit /b %errorlevel%
|
||||
7
scripts/build-net48-only.ps1
Normal file
7
scripts/build-net48-only.ps1
Normal file
@@ -0,0 +1,7 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$project = Join-Path $root 'src\IMSApiDotNet\IMSApiDotNet.Net48.csproj'
|
||||
dotnet restore $project
|
||||
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
||||
dotnet build $project -c Release --no-restore
|
||||
exit $LASTEXITCODE
|
||||
4
scripts/build-net48.cmd
Normal file
4
scripts/build-net48.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
setlocal
|
||||
dotnet build "%~dp0..\src\IMSApiDotNet\IMSApiDotNet.csproj" -c Release -f net48
|
||||
endlocal
|
||||
4
scripts/build-net48.ps1
Normal file
4
scripts/build-net48.ps1
Normal file
@@ -0,0 +1,4 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$project = Join-Path $root "src\IMSApiDotNet\IMSApiDotNet.csproj"
|
||||
dotnet build $project -c Release -f net48
|
||||
2
scripts/build.cmd
Normal file
2
scripts/build.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
dotnet build "%~dp0..\IMSApiDotNet_10.0.0-59_HttpClient.sln" -c Release
|
||||
3
scripts/build.ps1
Normal file
3
scripts/build.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
dotnet build "$root\IMSApiDotNet_10.0.0-59_HttpClient.sln" -c Release
|
||||
29
scripts/check-ihas-properties.ps1
Normal file
29
scripts/check-ihas-properties.ps1
Normal file
@@ -0,0 +1,29 @@
|
||||
param([string]$Configuration = "Release")
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$test = Join-Path $root "tests\IMSApiDotNet.PropertiesSmoke\IMSApiDotNet.PropertiesSmoke.csproj"
|
||||
|
||||
function Run-Test([string]$Framework) {
|
||||
Write-Host "Building DLL-directory ihas.properties smoke test for $Framework ..." -ForegroundColor Cyan
|
||||
dotnet build $test -c $Configuration -f $Framework
|
||||
if ($LASTEXITCODE -ne 0) { throw "$Framework build failed" }
|
||||
|
||||
if ($Framework -eq "net48") {
|
||||
$exe = Join-Path $root "tests\IMSApiDotNet.PropertiesSmoke\bin\$Configuration\net48\IMSApiDotNet.PropertiesSmoke.exe"
|
||||
& $exe
|
||||
}
|
||||
else {
|
||||
$dll = Join-Path $root "tests\IMSApiDotNet.PropertiesSmoke\bin\$Configuration\net8.0\IMSApiDotNet.PropertiesSmoke.dll"
|
||||
dotnet $dll
|
||||
}
|
||||
if ($LASTEXITCODE -ne 0) { throw "$Framework DLL-directory property test failed" }
|
||||
}
|
||||
|
||||
# net48 directly tests the net48 candidate. net8.0 consumes the project's
|
||||
# netstandard2.0 target. The test intentionally changes CWD and points
|
||||
# itac.propdir somewhere else; only ihas.properties next to IMSApiDotNet.dll
|
||||
# is allowed to supply the file values.
|
||||
Run-Test "net48"
|
||||
Run-Test "net8.0"
|
||||
|
||||
Write-Host "ihas.properties DLL-directory lookup passed for net48 and netstandard2.0." -ForegroundColor Green
|
||||
46
scripts/check-legacy-binary-compat.ps1
Normal file
46
scripts/check-legacy-binary-compat.ps1
Normal file
@@ -0,0 +1,46 @@
|
||||
param([string]$Configuration = "Release")
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$lib = Join-Path $root "src\IMSApiDotNet\IMSApiDotNet.csproj"
|
||||
$smoke = Join-Path $root "tests\IMSApiDotNet.LegacyBinarySmoke\IMSApiDotNet.LegacyBinarySmoke.csproj"
|
||||
|
||||
Write-Host "Building candidate net48 ..." -ForegroundColor Cyan
|
||||
dotnet build $lib -c $Configuration -f net48
|
||||
if ($LASTEXITCODE -ne 0) { throw "net48 build failed" }
|
||||
|
||||
Write-Host "Building candidate netstandard2.0 ..." -ForegroundColor Cyan
|
||||
dotnet build $lib -c $Configuration -f netstandard2.0
|
||||
if ($LASTEXITCODE -ne 0) { throw "netstandard2.0 build failed" }
|
||||
|
||||
Write-Host "Building smoke EXE AGAINST ORIGINAL 10.0.0-3 DLL ..." -ForegroundColor Cyan
|
||||
dotnet build $smoke -c $Configuration
|
||||
if ($LASTEXITCODE -ne 0) { throw "legacy smoke build failed" }
|
||||
|
||||
$smokeOut = Join-Path $root "tests\IMSApiDotNet.LegacyBinarySmoke\bin\$Configuration\net48"
|
||||
$exe = Join-Path $smokeOut "IMSApiDotNet.LegacyBinarySmoke.exe"
|
||||
if (-not (Test-Path $exe)) { throw "smoke exe not found: $exe" }
|
||||
|
||||
function Test-Candidate([string]$Target, [string]$CandidateDll) {
|
||||
if (-not (Test-Path $CandidateDll)) { throw "candidate not found: $CandidateDll" }
|
||||
$run = Join-Path $root "artifacts\abi-$Target"
|
||||
if (Test-Path $run) { Remove-Item $run -Recurse -Force }
|
||||
New-Item -ItemType Directory -Path $run -Force | Out-Null
|
||||
|
||||
Copy-Item $exe (Join-Path $run "IMSApiDotNet.LegacyBinarySmoke.exe") -Force
|
||||
$config = $exe + ".config"
|
||||
if (Test-Path $config) { Copy-Item $config (Join-Path $run "IMSApiDotNet.LegacyBinarySmoke.exe.config") -Force }
|
||||
Copy-Item $CandidateDll (Join-Path $run "IMSApiDotNet.dll") -Force
|
||||
|
||||
Write-Host "Running unchanged legacy EXE with $Target candidate ..." -ForegroundColor Yellow
|
||||
Push-Location $run
|
||||
try {
|
||||
& (Join-Path $run "IMSApiDotNet.LegacyBinarySmoke.exe")
|
||||
if ($LASTEXITCODE -ne 0) { throw "$Target binary compatibility failed (exit $LASTEXITCODE)" }
|
||||
}
|
||||
finally { Pop-Location }
|
||||
}
|
||||
|
||||
Test-Candidate "net48" (Join-Path $root "src\IMSApiDotNet\bin\$Configuration\net48\IMSApiDotNet.dll")
|
||||
Test-Candidate "netstandard2.0" (Join-Path $root "src\IMSApiDotNet\bin\$Configuration\netstandard2.0\IMSApiDotNet.dll")
|
||||
|
||||
Write-Host "Both targets passed legacy binary smoke test." -ForegroundColor Green
|
||||
3
scripts/test.ps1
Normal file
3
scripts/test.ps1
Normal file
@@ -0,0 +1,3 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
dotnet run --project "$root\tests\IMSApiDotNet.ProtocolVectors\IMSApiDotNet.ProtocolVectors.csproj" -c Release
|
||||
Reference in New Issue
Block a user