Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate
This commit is contained in:
Коммит
f05639d216
|
@ -1,5 +1,5 @@
|
|||
# Refer to https://hub.docker.com/_/microsoft-dotnet-sdk for available versions
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0.101-jammy
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0.203-jammy
|
||||
|
||||
# Installing mono makes `dotnet test` work without errors even for net472.
|
||||
# But installing it takes a long time, so it's excluded by default.
|
||||
|
|
|
@ -24,7 +24,6 @@ parameters:
|
|||
default: true
|
||||
|
||||
variables:
|
||||
MSBuildTreatWarningsAsErrors: true
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
BuildConfiguration: Release
|
||||
# codecov_token: 4dc9e7e2-6b01-4932-a180-847b52b43d35 # Get a new one from https://codecov.io/
|
||||
|
|
|
@ -2,7 +2,8 @@ parameters:
|
|||
RunTests:
|
||||
|
||||
steps:
|
||||
- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
|
||||
|
||||
- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnaserror /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
|
||||
displayName: 🛠 dotnet build
|
||||
|
||||
- powershell: azure-pipelines/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults
|
||||
|
|
|
@ -51,7 +51,6 @@ stages:
|
|||
|
||||
- stage: Build
|
||||
variables:
|
||||
MSBuildTreatWarningsAsErrors: false # re-enable after LOC warnings have been resolved
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
BuildConfiguration: Release
|
||||
NUGET_PACKAGES: $(Agent.TempDirectory)/.nuget/packages
|
||||
|
|
|
@ -28,7 +28,6 @@ steps:
|
|||
!**/linux-*/**
|
||||
!**/osx*/**
|
||||
TargetFolder: $(Build.ArtifactStagingDirectory)/APIScanInputs
|
||||
condition: and(succeeded(), ${{ parameters.EnableAPIScan }}, ne(variables.ApiScanClientId, ''))
|
||||
|
||||
- task: BinSkim@4
|
||||
displayName: 🔍 Run BinSkim
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
[string]::join(',',(@{
|
||||
'MicrosoftVisualStudioThreadingVersion' = & { (dotnet tool run nbgv get-version --project "$PSScriptRoot\..\..\src\Microsoft.VisualStudio.Threading" --format json | ConvertFrom-Json).AssemblyVersion };
|
||||
}.GetEnumerator() |% { "$($_.key)=$($_.value)" }))
|
||||
$MacroName = 'MicrosoftVisualStudioThreadingVersion'
|
||||
$SampleProject = "$PSScriptRoot\..\..\src\Microsoft.VisualStudio.Threading"
|
||||
try {
|
||||
return [string]::join(',',(@{
|
||||
($MacroName) = & { (dotnet tool run nbgv get-version --project $SampleProject --format json | ConvertFrom-Json).AssemblyVersion };
|
||||
}.GetEnumerator() |% { "$($_.key)=$($_.value)" }))
|
||||
}
|
||||
catch {
|
||||
Write-Error $_
|
||||
Write-Error "Failed. Diagnostic data proceeds:"
|
||||
[string]::join(',',(@{
|
||||
($MacroName) = & {
|
||||
Write-Host "dotnet tool run nbgv get-version --project `"$SampleProject`" --format json"
|
||||
$result1 = dotnet tool run nbgv get-version --project $SampleProject --format json
|
||||
Write-Host $result1
|
||||
$result2 = dotnet tool run nbgv get-version --project $SampleProject --format json | ConvertFrom-Json
|
||||
Write-Host $result2
|
||||
Write-Host $result2.AssemblyVersion
|
||||
Write-Host (dotnet tool run nbgv get-version --project $SampleProject --format json | ConvertFrom-Json).AssemblyVersion
|
||||
Write-Output (dotnet tool run nbgv get-version --project $SampleProject --format json | ConvertFrom-Json).AssemblyVersion
|
||||
};
|
||||
}.GetEnumerator() |% { "$($_.key)=$($_.value)" }))
|
||||
|
||||
Write-Host "one more..."
|
||||
$r = & { (dotnet tool run nbgv get-version --project $SampleProject --format json | ConvertFrom-Json).AssemblyVersion };
|
||||
Write-Host $r
|
||||
}
|
||||
|
|
12
init.ps1
12
init.ps1
|
@ -102,13 +102,13 @@ Push-Location $PSScriptRoot
|
|||
try {
|
||||
$HeaderColor = 'Green'
|
||||
|
||||
if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) {
|
||||
$RestoreArguments = @()
|
||||
if ($Interactive)
|
||||
{
|
||||
$RestoreArguments += '--interactive'
|
||||
}
|
||||
$RestoreArguments = @()
|
||||
if ($Interactive)
|
||||
{
|
||||
$RestoreArguments += '--interactive'
|
||||
}
|
||||
|
||||
if (!$NoRestore -and $PSCmdlet.ShouldProcess("NuGet packages", "Restore")) {
|
||||
Write-Host "Restoring NuGet packages" -ForegroundColor $HeaderColor
|
||||
dotnet restore @RestoreArguments
|
||||
if ($lastexitcode -ne 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче