Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<PropertyGroup>
<NetFrameworkVersion>net462</NetFrameworkVersion>
<DotNetVersion>net8.0</DotNetVersion>
<DotNetVersion>net10.0</DotNetVersion>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -45,10 +45,10 @@
</ItemGroup>

<PropertyGroup>
<ScenarioTestTargetFrameworks>net8.0;net9.0</ScenarioTestTargetFrameworks>
<UnitTestTargetFrameworks>net8.0;net9.0</UnitTestTargetFrameworks>
<ScenarioTestTargetFrameworks>net10.0</ScenarioTestTargetFrameworks>
<UnitTestTargetFrameworks>net10.0</UnitTestTargetFrameworks>
<!-- This is the target framework version of the built tests picked up to send to Helix -->
<XUnitPublishTargetFramework>net8.0</XUnitPublishTargetFramework>
<XUnitPublishTargetFramework>net10.0</XUnitPublishTargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
Expand Down
5 changes: 5 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<configuration>
<packageSources>
<clear />
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
<!-- Begin: Package sources from dotnet-dotnet -->
<add key="darc-pub-dotnet-dotnet-50d7970" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-dotnet-50d79701/nuget/v3/index.json" />
<!-- End: Package sources from dotnet-dotnet -->
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
</packageSources>
Expand Down
4 changes: 2 additions & 2 deletions eng/SendToHelix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<HelixPreCommands>$(HelixPreCommands);set NUGET_PACKAGES=%HELIX_WORKITEM_ROOT%\.nuget</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);set ServiceUri=localhost</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);set RunWithCoreWCF=true</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);%HELIX_CORRELATION_PAYLOAD%\SelfHostedCoreWCFService\$(Configuration)\net8.0\SelfHostedCoreWCFService bootstrap:true</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);%HELIX_CORRELATION_PAYLOAD%\SelfHostedCoreWCFService\$(Configuration)\net10.0\SelfHostedCoreWCFService bootstrap:true</HelixPreCommands>
</PropertyGroup>

<PropertyGroup Condition="'$(TestJob)' != 'Windows' AND '$(RunWithCoreWCFService)' == 'true'">
Expand All @@ -101,7 +101,7 @@
<HelixPreCommands>$(HelixPreCommands);export NUGET_PACKAGES=$HELIX_WORKITEM_ROOT/.nuget</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);export ServiceUri=localhost</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);export RunWithCoreWCF=true</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);dotnet exec --roll-forward Major $HELIX_CORRELATION_PAYLOAD/SelfHostedCoreWCFService/$(Configuration)/net8.0/SelfHostedCoreWCFService.dll bootstrap:true</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);dotnet exec --roll-forward Major $HELIX_CORRELATION_PAYLOAD/SelfHostedCoreWCFService/$(Configuration)/net10.0/SelfHostedCoreWCFService.dll bootstrap:true</HelixPreCommands>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion eng/common/PSScriptAnalyzerSettings.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
'PSStandardDSCFunctionsInResource',
'PSUseIdenticalMandatoryParametersForDSC',
'PSUseIdenticalParametersForDSC')
}
}
71 changes: 33 additions & 38 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# See example call for this script below.
#
# - task: PowerShell@2
# displayName: Setup internal Feeds Credentials
# displayName: Setup Private Feeds Credentials
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
# filePath: $(System.DefaultWorkingDirectory)/eng/common/SetupNugetSources.ps1
Expand All @@ -34,28 +34,19 @@ Set-StrictMode -Version 2.0

. $PSScriptRoot\tools.ps1

# Adds or enables the package source with the given name
function AddOrEnablePackageSource($sources, $disabledPackageSources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
if ($disabledPackageSources -eq $null -or -not (EnableInternalPackageSource -DisabledPackageSources $disabledPackageSources -Creds $creds -PackageSourceName $SourceName)) {
AddPackageSource -Sources $sources -SourceName $SourceName -SourceEndPoint $SourceEndPoint -Creds $creds -Username $userName -pwd $Password
}
}

# Add source entry to PackageSources
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $pwd) {
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")

if ($packageSource -eq $null)
{
Write-Host "Adding package source $SourceName"

$packageSource = $doc.CreateElement("add")
$packageSource.SetAttribute("key", $SourceName)
$packageSource.SetAttribute("value", $SourceEndPoint)
$sources.AppendChild($packageSource) | Out-Null
}
else {
Write-Host "Package source $SourceName already present and enabled."
Write-Host "Package source $SourceName already present."
}

AddCredential -Creds $creds -Source $SourceName -Username $Username -pwd $pwd
Expand All @@ -68,8 +59,6 @@ function AddCredential($creds, $source, $username, $pwd) {
return;
}

Write-Host "Inserting credential for feed: " $source

# Looks for credential configuration for the given SourceName. Create it if none is found.
$sourceElement = $creds.SelectSingleNode($Source)
if ($sourceElement -eq $null)
Expand Down Expand Up @@ -102,27 +91,24 @@ function AddCredential($creds, $source, $username, $pwd) {
$passwordElement.SetAttribute("value", $pwd)
}

# Enable all darc-int package sources.
function EnableMaestroInternalPackageSources($DisabledPackageSources, $Creds) {
$maestroInternalSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
ForEach ($DisabledPackageSource in $maestroInternalSources) {
EnableInternalPackageSource -DisabledPackageSources $DisabledPackageSources -Creds $Creds -PackageSourceName $DisabledPackageSource.key
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $pwd) {
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")

Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."

ForEach ($PackageSource in $maestroPrivateSources) {
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -pwd $pwd
}
}

# Enables an internal package source by name, if found. Returns true if the package source was found and enabled, false otherwise.
function EnableInternalPackageSource($DisabledPackageSources, $Creds, $PackageSourceName) {
$DisabledPackageSource = $DisabledPackageSources.SelectSingleNode("add[@key='$PackageSourceName']")
if ($DisabledPackageSource) {
Write-Host "Enabling internal source '$($DisabledPackageSource.key)'."

function EnablePrivatePackageSources($DisabledPackageSources) {
$maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
ForEach ($DisabledPackageSource in $maestroPrivateSources) {
Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
$DisabledPackageSources.RemoveChild($DisabledPackageSource)

AddCredential -Creds $creds -Source $DisabledPackageSource.Key -Username $userName -pwd $Password
return $true
}
return $false
}

if (!(Test-Path $ConfigFile -PathType Leaf)) {
Expand All @@ -135,17 +121,15 @@ $doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
$doc.Load($filename)

# Get reference to <PackageSources> - fail if none exist
# Get reference to <PackageSources> or create one if none exist already
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
if ($sources -eq $null) {
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. NuGet config file must contain a packageSources section: $ConfigFile"
ExitWithExitCode 1
$sources = $doc.CreateElement("packageSources")
$doc.DocumentElement.AppendChild($sources) | Out-Null
}

$creds = $null
$feedSuffix = "v3/index.json"
if ($Password) {
$feedSuffix = "v2"
# Looks for a <PackageSourceCredentials> node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
Expand All @@ -154,22 +138,33 @@ if ($Password) {
}
}

$userName = "dn-bot"

# Check for disabledPackageSources; we'll enable any darc-int ones we find there
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
if ($disabledSources -ne $null) {
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
EnableMaestroInternalPackageSources -DisabledPackageSources $disabledSources -Creds $creds
EnablePrivatePackageSources -DisabledPackageSources $disabledSources
}

$userName = "dn-bot"

# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -pwd $Password

# 3.1 uses a different feed url format so it's handled differently here
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
}

$dotnetVersions = @('5','6','7','8','9','10')

foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
if ($dotnetSource -ne $null) {
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
AddOrEnablePackageSource -Sources $sources -DisabledPackageSources $disabledSources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/$feedSuffix" -Creds $creds -Username $userName -pwd $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -pwd $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -pwd $Password
}
}

Expand Down
2 changes: 1 addition & 1 deletion eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ runtime_source_feed=''
runtime_source_feed_key=''

properties=()
while [[ $# -gt 0 ]]; do
while [[ $# > 0 ]]; do
opt="$(echo "${1/#--/-}" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-help|-h)
Expand Down
6 changes: 0 additions & 6 deletions eng/common/core-templates/job/job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ parameters:
# publishing defaults
artifacts: ''
enableMicrobuild: false
enablePreviewMicrobuild: false
microbuildPluginVersion: 'latest'
enableMicrobuildForMacAndLinux: false
microbuildUseESRP: true
enablePublishBuildArtifacts: false
Expand Down Expand Up @@ -130,8 +128,6 @@ jobs:
- template: /eng/common/core-templates/steps/install-microbuild.yml
parameters:
enableMicrobuild: ${{ parameters.enableMicrobuild }}
enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
microbuildUseESRP: ${{ parameters.microbuildUseESRP }}
continueOnError: ${{ parameters.continueOnError }}
Expand All @@ -157,8 +153,6 @@ jobs:
- template: /eng/common/core-templates/steps/cleanup-microbuild.yml
parameters:
enableMicrobuild: ${{ parameters.enableMicrobuild }}
enablePreviewMicrobuild: ${{ parameters.enablePreviewMicrobuild }}
microbuildPluginVersion: ${{ parameters.microbuildPluginVersion }}
enableMicrobuildForMacAndLinux: ${{ parameters.enableMicrobuildForMacAndLinux }}
continueOnError: ${{ parameters.continueOnError }}

Expand Down
2 changes: 1 addition & 1 deletion eng/common/core-templates/job/source-index-stage1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:

- template: /eng/common/core-templates/steps/source-index-stage1-publish.yml
parameters:
binLogPath: ${{ parameters.binLogPath }}
binLogPath: ${{ parameters.binLogPath }}
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ steps:
storageAccount: dotnetbuilds
container: internal
permissions: rl
is1ESPipeline: ${{ parameters.is1ESPipeline }}
is1ESPipeline: ${{ parameters.is1ESPipeline }}
2 changes: 1 addition & 1 deletion eng/common/core-templates/steps/generate-sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# IgnoreDirectories - Directories to ignore for SBOM generation. This will be passed through to the CG component detector.

parameters:
PackageVersion: 11.0.0
PackageVersion: 10.0.0
BuildDropPath: '$(System.DefaultWorkingDirectory)/artifacts'
PackageName: '.NET'
ManifestDirPath: $(Build.ArtifactStagingDirectory)/sbom
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ steps:
exit 1
}
Write-Host "Setting '${{ parameters.outputVariableName }}' with the access token value"
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken"
Write-Host "##vso[task.setvariable variable=${{ parameters.outputVariableName }};issecret=true;isOutput=${{ parameters.isStepOutputVariable }}]$accessToken"
34 changes: 0 additions & 34 deletions eng/common/core-templates/steps/install-microbuild-impl.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ steps:
parameters:
is1ESPipeline: ${{ parameters.is1ESPipeline }}
${{ each parameter in parameters.args }}:
${{ parameter.key }}: ${{ parameter.value }}
${{ parameter.key }}: ${{ parameter.value }}
2 changes: 1 addition & 1 deletion eng/common/core-templates/steps/retain-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ steps:
displayName: Enable permanent build retention
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
BUILD_ID: $(Build.BuildId)
BUILD_ID: $(Build.BuildId)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
sourceIndexUploadPackageVersion: 2.0.0-20250906.1
sourceIndexProcessBinlogPackageVersion: 1.0.1-20250906.1
sourceIndexUploadPackageVersion: 2.0.0-20250818.1
sourceIndexProcessBinlogPackageVersion: 1.0.1-20250818.1
sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
binlogPath: artifacts/log/Debug/Build.binlog

Expand Down
2 changes: 1 addition & 1 deletion eng/common/core-templates/variables/pool-providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ variables:
- ${{ if eq(parameters.is1ESPipeline, 'true') }}:
- template: /eng/common/templates-official/variables/pool-providers.yml
- ${{ else }}:
- template: /eng/common/templates/variables/pool-providers.yml
- template: /eng/common/templates/variables/pool-providers.yml
2 changes: 1 addition & 1 deletion eng/common/darc-init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Darc' -Message $_
ExitWithExitCode 1
}
}
2 changes: 1 addition & 1 deletion eng/common/darc-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ darcVersion=''
versionEndpoint='https://maestro.dot.net/api/assets/darc-version?api-version=2020-02-20'
verbosity='minimal'

while [[ $# -gt 0 ]]; do
while [[ $# > 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
--darcversion)
Expand Down
2 changes: 1 addition & 1 deletion eng/common/dotnet-install.cmd
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
2 changes: 1 addition & 1 deletion eng/common/dotnet-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ architecture=''
runtime='dotnet'
runtimeSourceFeed=''
runtimeSourceFeedKey=''
while [[ $# -gt 0 ]]; do
while [[ $# > 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
-version|-v)
Expand Down
2 changes: 1 addition & 1 deletion eng/common/dotnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ source $scriptroot/tools.sh
InitializeDotNetCli true # install

# Invoke acquired SDK with args if they are provided
if [[ $# -gt 0 ]]; then
if [[ $# > 0 ]]; then
__dotnetDir=${_InitializeDotNetCli}
dotnetPath=${__dotnetDir}/dotnet
${dotnetPath} "$@"
Expand Down
2 changes: 1 addition & 1 deletion eng/common/init-tools-native.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off
powershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command "& """%~dp0init-tools-native.ps1""" %*"
exit /b %ErrorLevel%
exit /b %ErrorLevel%
2 changes: 1 addition & 1 deletion eng/common/internal-feed-operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ operation=''
authToken=''
repoName=''

while [[ $# -gt 0 ]]; do
while [[ $# > 0 ]]; do
opt="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case "$opt" in
--operation)
Expand Down
Loading
Loading