Skip to content

Commit df6c4ed

Browse files
Update to .NET 6 (#116)
* Update to .NET 6 Update the providers to .NET 6, using new language features and APIs as appropriate. * Remove custom NuGet feeds Remove custom NuGet feeds to packages for .NET 6 are sourced from NuGet.org.
1 parent 93cf446 commit df6c4ed

File tree

111 files changed

+3747
-2302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+3747
-2302
lines changed

AspNet.Security.OpenId.Providers.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.28803.156
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31825.309
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EFBB5EFD-334C-487E-8C31-9F21FB106FFF}"
77
EndProject

Directory.Build.props

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
44

55
<PropertyGroup>
6-
<DefaultNetCoreTargetFramework>net5.0</DefaultNetCoreTargetFramework>
6+
<DefaultNetCoreTargetFramework>net6.0</DefaultNetCoreTargetFramework>
77
<LangVersion>latest</LangVersion>
88
<NoWarn>$(NoWarn);CS1591</NoWarn>
99
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -51,6 +51,12 @@
5151
<EnableNETAnalyzers>true</EnableNETAnalyzers>
5252
</PropertyGroup>
5353

54+
<PropertyGroup>
55+
<EnablePackageValidation>$(IsPackable)</EnablePackageValidation>
56+
<!-- TODO Remove suppression once 6.0.0 is released. -->
57+
<NoWarn>$(NoWarn);PKV006</NoWarn>
58+
</PropertyGroup>
59+
5460
<PropertyGroup>
5561
<RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>
5662
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
@@ -69,4 +75,13 @@
6975
<ProjectCapability Include="DynamicFileNesting" />
7076
</ItemGroup>
7177

78+
<PropertyGroup>
79+
<ImplicitUsings>enable</ImplicitUsings>
80+
</PropertyGroup>
81+
82+
<ItemGroup>
83+
<Using Include="JetBrains.Annotations" />
84+
<Using Include="Microsoft.AspNetCore.Authentication" />
85+
</ItemGroup>
86+
7287
</Project>

NuGet.config

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4+
<clear />
45
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
56
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
67
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
7-
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
8-
<add key="azureadwebstacknightly" value="https://www.myget.org/F/azureadwebstacknightly/api/v3/index.json" />
8+
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
99
</packageSources>
10+
<disabledPackageSources>
11+
<clear />
12+
</disabledPackageSources>
1013
</configuration>

Packages.props

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
<ItemGroup>
44
<PackageReference Update="AngleSharp" Version="0.13.0" />
5-
<PackageReference Update="JetBrains.Annotations" Version="2020.1.0" />
6-
<PackageReference Update="JustEat.HttpClientInterception" Version="3.0.0" />
7-
<PackageReference Update="MartinCostello.Logging.XUnit" Version="0.1.0" />
8-
<PackageReference Update="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.5" />
9-
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="3.1.5" />
10-
<PackageReference Update="Microsoft.IdentityModel.Protocols" Version="5.6.0" />
11-
<PackageReference Update="Newtonsoft.Json" Version="10.0.3" />
5+
<PackageReference Update="JetBrains.Annotations" Version="2021.3.0" />
6+
<PackageReference Update="JustEat.HttpClientInterception" Version="3.1.1" />
7+
<PackageReference Update="MartinCostello.Logging.XUnit" Version="0.2.0" />
8+
<PackageReference Update="Microsoft.AspNetCore.Mvc.Testing" Version="6.0.0" />
9+
<PackageReference Update="Microsoft.AspNetCore.TestHost" Version="6.0.0" />
10+
<PackageReference Update="Microsoft.IdentityModel.Protocols" Version="6.10.0" />
1211
<PackageReference Update="Shouldly" Version="3.0.2" />
13-
<PackageReference Update="System.Text.Json" Version="4.7.2" />
12+
<PackageReference Update="System.Text.Json" Version="6.0.0" />
1413
</ItemGroup>
1514

1615
</Project>

eng/Version.Details.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
</ProductDependencies>
66

77
<ToolsetDependencies>
8-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20180.5">
8+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.21519.3">
99
<Uri>https://github.com/dotnet/arcade</Uri>
10-
<Sha>09bb9d929120b402348c9a0e9c8c951e824059aa</Sha>
10+
<Sha>85f3aa16d8797b5020f1fda11df1a958feb5f8df</Sha>
11+
<SourceBuild RepoName="arcade" ManagedOnly="true" />
1112
</Dependency>
1213

13-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20180.5">
14+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="6.0.0-beta.21519.3">
1415
<Uri>https://github.com/dotnet/arcade</Uri>
15-
<Sha>09bb9d929120b402348c9a0e9c8c951e824059aa</Sha>
16+
<Sha>85f3aa16d8797b5020f1fda11df1a958feb5f8df</Sha>
1617
</Dependency>
1718
</ToolsetDependencies>
1819

eng/Versions.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<Project>
22

33
<PropertyGroup>
4-
<MajorVersion>5</MajorVersion>
4+
<MajorVersion>6</MajorVersion>
55
<MinorVersion>0</MinorVersion>
6-
<PatchVersion>1</PatchVersion>
6+
<PatchVersion>0</PatchVersion>
77
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
8+
<!-- TODO Baseline to 6.0.0 once released -->
9+
<PackageValidationBaselineVersion>5.0.0</PackageValidationBaselineVersion>
810
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
911
<PreReleaseVersionIteration></PreReleaseVersionIteration>
1012
<PreReleaseBrandingLabel>Preview $(PreReleaseVersionIteration)</PreReleaseBrandingLabel>

eng/common/SetupNugetSources.ps1

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
1212
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
1313
#
14+
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing
15+
#
1416
# - task: PowerShell@2
1517
# displayName: Setup Private Feeds Credentials
1618
# condition: eq(variables['Agent.OS'], 'Windows_NT')
@@ -83,7 +85,7 @@ function AddCredential($creds, $source, $username, $password) {
8385
$passwordElement.SetAttribute("value", $Password)
8486
}
8587

86-
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
88+
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
8789
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
8890

8991
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
@@ -94,6 +96,15 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
9496
}
9597
}
9698

99+
function EnablePrivatePackageSources($DisabledPackageSources) {
100+
$maestroPrivateSources = $DisabledPackageSources.SelectNodes("add[contains(@key,'darc-int')]")
101+
ForEach ($DisabledPackageSource in $maestroPrivateSources) {
102+
Write-Host "`tEnsuring private source '$($DisabledPackageSource.key)' is enabled by deleting it from disabledPackageSource"
103+
# Due to https://github.com/NuGet/Home/issues/10291, we must actually remove the disabled entries
104+
$DisabledPackageSources.RemoveChild($DisabledPackageSource)
105+
}
106+
}
107+
97108
if (!(Test-Path $ConfigFile -PathType Leaf)) {
98109
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
99110
ExitWithExitCode 1
@@ -123,19 +134,34 @@ if ($creds -eq $null) {
123134
$doc.DocumentElement.AppendChild($creds) | Out-Null
124135
}
125136

126-
# Insert credential nodes for Maestro's private feeds
127-
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
128-
129-
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
130-
if ($dotnet3Source -ne $null) {
131-
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
132-
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
137+
# Check for disabledPackageSources; we'll enable any darc-int ones we find there
138+
$disabledSources = $doc.DocumentElement.SelectSingleNode("disabledPackageSources")
139+
if ($disabledSources -ne $null) {
140+
Write-Host "Checking for any darc-int disabled package sources in the disabledPackageSources node"
141+
EnablePrivatePackageSources -DisabledPackageSources $disabledSources
133142
}
134143

144+
$userName = "dn-bot"
145+
146+
# Insert credential nodes for Maestro's private feeds
147+
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
148+
135149
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
136150
if ($dotnet31Source -ne $null) {
137-
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
138-
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 "dn-bot" -Password $Password
151+
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
152+
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 -Password $Password
153+
}
154+
155+
$dotnet5Source = $sources.SelectSingleNode("add[@key='dotnet5']")
156+
if ($dotnet5Source -ne $null) {
157+
AddPackageSource -Sources $sources -SourceName "dotnet5-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
158+
AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
159+
}
160+
161+
$dotnet6Source = $sources.SelectSingleNode("add[@key='dotnet6']")
162+
if ($dotnet6Source -ne $null) {
163+
AddPackageSource -Sources $sources -SourceName "dotnet6-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
164+
AddPackageSource -Sources $sources -SourceName "dotnet6-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
139165
}
140166

141167
$doc.Save($filename)

eng/common/SetupNugetSources.sh

Lines changed: 64 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
1414
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
1515
#
16+
# Any disabledPackageSources entries which start with "darc-int" will be re-enabled as part of this script executing.
17+
#
1618
# - task: Bash@3
1719
# displayName: Setup Private Feeds Credentials
1820
# inputs:
@@ -63,7 +65,7 @@ if [ "$?" != "0" ]; then
6365
ConfigNodeHeader="<configuration>"
6466
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"
6567

66-
sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config
68+
sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" $ConfigFile
6769
fi
6870

6971
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
@@ -74,58 +76,81 @@ if [ "$?" != "0" ]; then
7476
PackageSourcesNodeFooter="</packageSources>"
7577
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"
7678

77-
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
79+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" $ConfigFile
7880
fi
7981

8082
PackageSources=()
8183

82-
# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
83-
grep -i "<add key=\"dotnet3\"" $ConfigFile
84+
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
85+
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
86+
if [ "$?" == "0" ]; then
87+
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
88+
if [ "$?" != "0" ]; then
89+
echo "Adding dotnet3.1-internal to the packageSources."
90+
PackageSourcesNodeFooter="</packageSources>"
91+
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
92+
93+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
94+
fi
95+
PackageSources+=('dotnet3.1-internal')
96+
97+
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
98+
if [ "$?" != "0" ]; then
99+
echo "Adding dotnet3.1-internal-transport to the packageSources."
100+
PackageSourcesNodeFooter="</packageSources>"
101+
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
84102

103+
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
104+
fi
105+
PackageSources+=('dotnet3.1-internal-transport')
106+
fi
107+
108+
# Ensure dotnet5-internal and dotnet5-internal-transport are in the packageSources if the public dotnet5 feeds are present
109+
grep -i "<add key=\"dotnet5\"" $ConfigFile
85110
if [ "$?" == "0" ]; then
86-
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
111+
grep -i "<add key=\"dotnet5-internal\"" $ConfigFile
87112
if [ "$?" != "0" ]; then
88-
echo "Adding dotnet3-internal to the packageSources."
113+
echo "Adding dotnet5-internal to the packageSources."
89114
PackageSourcesNodeFooter="</packageSources>"
90-
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
115+
PackageSourceTemplate="${TB}<add key=\"dotnet5-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2\" />"
91116

92117
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
93118
fi
94-
PackageSources+=('dotnet3-internal')
119+
PackageSources+=('dotnet5-internal')
95120

96-
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile
121+
grep -i "<add key=\"dotnet5-internal-transport\">" $ConfigFile
97122
if [ "$?" != "0" ]; then
98-
echo "Adding dotnet3-internal-transport to the packageSources."
123+
echo "Adding dotnet5-internal-transport to the packageSources."
99124
PackageSourcesNodeFooter="</packageSources>"
100-
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
125+
PackageSourceTemplate="${TB}<add key=\"dotnet5-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2\" />"
101126

102127
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
103128
fi
104-
PackageSources+=('dotnet3-internal-transport')
129+
PackageSources+=('dotnet5-internal-transport')
105130
fi
106131

107-
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
108-
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
132+
# Ensure dotnet6-internal and dotnet6-internal-transport are in the packageSources if the public dotnet6 feeds are present
133+
grep -i "<add key=\"dotnet6\"" $ConfigFile
109134
if [ "$?" == "0" ]; then
110-
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
135+
grep -i "<add key=\"dotnet6-internal\"" $ConfigFile
111136
if [ "$?" != "0" ]; then
112-
echo "Adding dotnet3.1-internal to the packageSources."
137+
echo "Adding dotnet6-internal to the packageSources."
113138
PackageSourcesNodeFooter="</packageSources>"
114-
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
139+
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2\" />"
115140

116141
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
117142
fi
118-
PackageSources+=('dotnet3.1-internal')
143+
PackageSources+=('dotnet6-internal')
119144

120-
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
145+
grep -i "<add key=\"dotnet6-internal-transport\">" $ConfigFile
121146
if [ "$?" != "0" ]; then
122-
echo "Adding dotnet3.1-internal-transport to the packageSources."
147+
echo "Adding dotnet6-internal-transport to the packageSources."
123148
PackageSourcesNodeFooter="</packageSources>"
124-
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
149+
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2\" />"
125150

126151
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
127152
fi
128-
PackageSources+=('dotnet3.1-internal-transport')
153+
PackageSources+=('dotnet6-internal-transport')
129154
fi
130155

131156
# I want things split line by line
@@ -147,3 +172,20 @@ for FeedName in ${PackageSources[@]} ; do
147172
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
148173
fi
149174
done
175+
176+
# Re-enable any entries in disabledPackageSources where the feed name contains darc-int
177+
grep -i "<disabledPackageSources>" $ConfigFile
178+
if [ "$?" == "0" ]; then
179+
DisabledDarcIntSources=()
180+
echo "Re-enabling any disabled \"darc-int\" package sources in $ConfigFile"
181+
DisabledDarcIntSources+=$(grep -oh '"darc-int-[^"]*" value="true"' $ConfigFile | tr -d '"')
182+
for DisabledSourceName in ${DisabledDarcIntSources[@]} ; do
183+
if [[ $DisabledSourceName == darc-int* ]]
184+
then
185+
OldDisableValue="<add key=\"$DisabledSourceName\" value=\"true\" />"
186+
NewDisableValue="<!-- Reenabled for build : $DisabledSourceName -->"
187+
sed -i.bak "s|$OldDisableValue|$NewDisableValue|" $ConfigFile
188+
echo "Neutralized disablePackageSources entry for '$DisabledSourceName'"
189+
fi
190+
done
191+
fi

eng/common/build.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ Param(
2020
[switch] $publish,
2121
[switch] $clean,
2222
[switch][Alias('bl')]$binaryLog,
23+
[switch][Alias('nobl')]$excludeCIBinarylog,
2324
[switch] $ci,
2425
[switch] $prepareMachine,
26+
[string] $runtimeSourceFeed = '',
27+
[string] $runtimeSourceFeedKey = '',
28+
[switch] $excludePrereleaseVS,
2529
[switch] $help,
2630
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
2731
)
@@ -58,9 +62,11 @@ function Print-Usage() {
5862
Write-Host "Advanced settings:"
5963
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
6064
Write-Host " -ci Set when running on CI server"
65+
Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)"
6166
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
6267
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
6368
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
69+
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
6470
Write-Host ""
6571

6672
Write-Host "Command line arguments not listed above are passed thru to msbuild."
@@ -134,7 +140,9 @@ try {
134140
}
135141

136142
if ($ci) {
137-
$binaryLog = $true
143+
if (-not $excludeCIBinarylog) {
144+
$binaryLog = $true
145+
}
138146
$nodeReuse = $false
139147
}
140148

0 commit comments

Comments
 (0)