Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[net9.0] Merge main to net9.0 #20935

Merged
merged 24 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fdebf71
[ios] fix memory leak in SearchBar (#16383)
jonathanpeppers Feb 27, 2024
55462f9
[UITest] Re-enable iOS Scrolling tests (#20618)
tj-devel709 Feb 27, 2024
37ca0c2
iOS Shell TitleView Update Height (#20795)
tj-devel709 Feb 27, 2024
e109469
Ignore ScrollRectToVisible if KeyboardAutoManagerScroll is enabled in…
artemvalieiev Feb 27, 2024
481ef9b
Add 9.0.0-preview.1.9973 to issue template (#20880)
samhouts Feb 27, 2024
7875a7a
Add IEffectControlProvider docs (#20872)
jknaudt21 Feb 28, 2024
2ef30dc
Document missing properties for ViewHandler (#20853)
jknaudt21 Feb 28, 2024
b11b845
[ci] Fix versions again when no sha provided (#20873)
rmarinho Feb 28, 2024
4c699ce
Log UI data for failure (#20888)
PureWeen Feb 28, 2024
eff8b4d
[testing] Ignore TopTabsDontScrollBackToStartWhenSelected (#20891)
rmarinho Feb 28, 2024
4e09b61
[Windows] Handle ConnectionProfiles exception (#20757)
Foda Feb 28, 2024
eb9666b
Fix crash if users only sets selected color on android bottom tabs (#…
PureWeen Feb 28, 2024
be98c17
Check if CV Item Handler has been created (#20900)
PureWeen Feb 28, 2024
a420b02
No not reference MSBuild tasks in the app (#20899)
mattleibow Feb 28, 2024
b0c6e45
Fixed Shell.NavBarHasShadow on Android (#20188)
kubaflo Feb 28, 2024
ce90b58
Graphics TextAttribute size & name mixup (#20861)
jfversluis Feb 28, 2024
095c3a6
[Windows] Registering new double-tap event can end up in the event be…
MartyIX Feb 29, 2024
da1de0e
[Testing] Added categories to Controls.AppiumTests (#20642)
jsuarezruiz Feb 29, 2024
1307634
Updated Development guide (#20543)
jsuarezruiz Feb 29, 2024
785addb
[Windows] Fix template check for item recycle (#20875)
Foda Feb 29, 2024
2ddd28a
Restore iOS SecureStorage.DefaultAccessible default value (#20914)
jfversluis Feb 29, 2024
df7a2c9
[C] Propagate Resource changes to Background (#20637)
StephaneDelcroix Feb 29, 2024
6aaeb44
[ci] Enable 1ES PT (#20728)
rmarinho Mar 1, 2024
8f996ad
Merge branch 'main' into merge-main-net9
rmarinho Mar 1, 2024
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
14 changes: 11 additions & 3 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ Before opening the solution in Visual Studio / VS Code you **MUST** build the bu
*NOTE*: IntelliSense takes a decent amount of time to fully process your solution. It will eventually work through all the necessary tasks. If you are having IntelliSense issues, usually unloading/reloading the `maui.core` and `maui.controls` projects will resolve.

## What branch should I use?
- main

Always use main no matter what you are working on or where you are hoping your change will get applied. We make sure that main always works against the current stable releases of Visual Studio and the .NET MAUI SDK. Even if you are working on features that will only be released with a future version of .NET. `main` is the only relevant branch for current development.
As a general rule:
- [main](https://github.com/dotnet/maui/tree/main)

Use ‘main’ for bug fixes that don’t require API changes. For new features and changes to public APIs, you must use the branch of the next .NET version.

- [net9.0](https://github.com/dotnet/maui/tree/net9.0)

## Repository projects

Expand Down Expand Up @@ -116,8 +120,10 @@ These are tests used for exercising the UI through accessibility layers to simul

```
├── Controls
│ ├── samples
│ │ ├── Controls.Sample.UITests
│ ├── tests
│ │ ├── UITests
│ │ ├── Controls.AppiumTests
```

### Unit Test Projects
Expand Down Expand Up @@ -146,6 +152,8 @@ These tests can be ran using the test explorer in VS, or from command line with
dotnet test src/TestUtils/src/Microsoft.Maui.IntegrationTests --logger "console;verbosity=diagnostic" --filter "Name=Build\(%22maui%22,%22net7.0%22,%22Debug%22,False\)"
```

You can find detailed information about testing in the [Wiki](https://github.com/dotnet/maui/wiki/Testing).

### Additional Cake Commands

#### Clean
Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ body:
description: In what version do you see this issue? Run `dotnet workload list` to find your version.
options:
-
- 9.0.0-preview.1.9973
- 8.0.7 SR2
- 8.0.6 SR1
- 8.0.3 GA
Expand Down Expand Up @@ -79,7 +80,7 @@ body:
id: version-that-worked
attributes:
label: Last version that worked well
description: If you answered yes, there a version on which this _did_ work, which one? If no or unknown, please select `Unknown/Other`. Run `dotnet workload list` to find your version.
description: If you answered yes, is there a version on which this _did_ work, which one? If no or unknown, please select `Unknown/Other`. Run `dotnet workload list` to find your version.
options:
-
- Unknown/Other
Expand Down Expand Up @@ -107,6 +108,7 @@ body:
- 8.0.3 GA
- 8.0.6 SR1
- 8.0.7 SR2
- 9.0.0-preview.1.9973
validations:
required: true
- type: dropdown
Expand Down
4 changes: 2 additions & 2 deletions eng/Versions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
<GitSemVerDashLabel Condition="'$(GitSemVerLabel)' != ''" >-$(GitSemVerLabel)</GitSemVerDashLabel>
</PropertyGroup>
<ItemGroup>
<VersionMetadata Include="$(GitCommits)" Condition="'$(GitSemVerDashLabel)' == ''" />
<VersionMetadata Condition="'$(GitSemVerDashLabel)' == '' and '$(GitCommits)' != ''" Include="$(GitCommits)" />

<VersionMetadata Condition="$(CI) and '$(BUILD_REASON)' == 'PullRequest'"
Include="pr.$(SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)"/>

<VersionMetadata Include="sha.$(GitCommit)"/>
<VersionMetadata Condition="'$(GitCommit)' != ''" Include="sha.$(GitCommit)"/>

<VersionMetadata Condition="$(CI)"
Include="azdo.$(BUILD_BUILDID)"/>
Expand Down
13 changes: 0 additions & 13 deletions eng/automation/guardian/CredScanSuppressions.json

This file was deleted.

12 changes: 0 additions & 12 deletions eng/automation/guardian/PoliCheck.Exclusions.xml

This file was deleted.

8 changes: 8 additions & 0 deletions eng/automation/guardian/source.gdnsuppress
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@
"default"
],
"createdDate": "2023-12-19 01:00:51Z"
},
"db932a43593049dd3d581d65ef9043ce4a5cc9f6970942c61f7ff29a8395ab5a": {
"signature": "db932a43593049dd3d581d65ef9043ce4a5cc9f6970942c61f7ff29a8395ab5a",
"alternativeSignatures": [],
"memberOf": [
"default"
],
"createdDate": "2024-02-27 23:34:18Z"
}
}
}
10 changes: 5 additions & 5 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)][string]$ConfigFile,
[Parameter(Mandatory = $true)][string]$Password
[Parameter(Mandatory = $true)][SecureString]$Password
)

$ErrorActionPreference = "Stop"
Expand All @@ -35,7 +35,7 @@ Set-StrictMode -Version 2.0
. $PSScriptRoot\tools.ps1

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

if ($packageSource -eq $null)
Expand All @@ -53,7 +53,7 @@ function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Usern
}

# Add a credential node for the specified source
function AddCredential($creds, $source, $username, $password) {
function AddCredential([SecureString] $creds, $source, $username, [SecureString] $password) {
# 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 @@ -85,7 +85,7 @@ function AddCredential($creds, $source, $username, $password) {
$passwordElement.SetAttribute("value", $Password)
}

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

Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
Expand Down Expand Up @@ -164,4 +164,4 @@ foreach ($dotnetVersion in $dotnetVersions) {
}
}

$doc.Save($filename)
$doc.Save($filename)
Empty file modified eng/common/pipeline-logging-functions.sh
100644 → 100755
Empty file.
60 changes: 36 additions & 24 deletions eng/common/tools.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ $ErrorActionPreference = 'Stop'
# Base-64 encoded SAS token that has permission to storage container described by $runtimeSourceFeed
[string]$runtimeSourceFeedKey = if (Test-Path variable:runtimeSourceFeedKey) { $runtimeSourceFeedKey } else { $null }

# True if the build is a product build
[bool]$productBuild = if (Test-Path variable:productBuild) { $productBuild } else { $false }

function Create-Directory ([string[]] $path) {
New-Item -Path $path -Force -ItemType 'Directory' | Out-Null
}
Expand Down Expand Up @@ -158,18 +161,13 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
$env:DOTNET_MULTILEVEL_LOOKUP=0

# Disable first run since we do not need all ASP.NET packages restored.
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
$env:DOTNET_NOLOGO=1

# Disable telemetry on CI.
if ($ci) {
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
}

# Source Build uses DotNetCoreSdkDir variable
if ($env:DotNetCoreSdkDir -ne $null) {
$env:DOTNET_INSTALL_DIR = $env:DotNetCoreSdkDir
}

# Find the first path on %PATH% that contains the dotnet.exe
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
$dotnetExecutable = GetExecutableFileName 'dotnet'
Expand Down Expand Up @@ -228,7 +226,7 @@ function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
Write-PipelinePrependPath -Path $dotnetRoot

Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
Write-PipelineSetVariable -Name 'DOTNET_NOLOGO' -Value '1'

return $global:_DotNetInstallDir = $dotnetRoot
}
Expand Down Expand Up @@ -379,13 +377,13 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
}

# Minimum VS version to require.
$vsMinVersionReqdStr = '17.6'
$vsMinVersionReqdStr = '17.7'
$vsMinVersionReqd = [Version]::new($vsMinVersionReqdStr)

# If the version of msbuild is going to be xcopied,
# use this version. Version matches a package here:
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/RoslynTools.MSBuild/versions/17.6.0-2
$defaultXCopyMSBuildVersion = '17.6.0-2'
# https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet-eng/NuGet/Microsoft.DotNet.Arcade.MSBuild.Xcopy/versions/17.8.5
$defaultXCopyMSBuildVersion = '17.8.5'

if (!$vsRequirements) {
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
Expand Down Expand Up @@ -450,7 +448,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
if ($xcopyMSBuildVersion.Trim() -ine "none") {
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
if ($vsInstallDir -eq $null) {
throw "Could not xcopy msbuild. Please check that package 'RoslynTools.MSBuild @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'."
throw "Could not xcopy msbuild. Please check that package 'Microsoft.DotNet.Arcade.MSBuild.Xcopy @ $xcopyMSBuildVersion' exists on feed 'dotnet-eng'."
}
}
if ($vsInstallDir -eq $null) {
Expand Down Expand Up @@ -487,7 +485,7 @@ function InstallXCopyMSBuild([string]$packageVersion) {
}

function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
$packageName = 'RoslynTools.MSBuild'
$packageName = 'Microsoft.DotNet.Arcade.MSBuild.Xcopy'
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"

Expand Down Expand Up @@ -601,7 +599,15 @@ function InitializeBuildTool() {
ExitWithExitCode 1
}
$dotnetPath = Join-Path $dotnetRoot (GetExecutableFileName 'dotnet')
$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'net8.0' }

# Use override if it exists - commonly set by source-build
if ($null -eq $env:_OverrideArcadeInitializeBuildToolFramework) {
$initializeBuildToolFramework="net9.0"
} else {
$initializeBuildToolFramework=$env:_OverrideArcadeInitializeBuildToolFramework
}

$buildTool = @{ Path = $dotnetPath; Command = 'msbuild'; Tool = 'dotnet'; Framework = $initializeBuildToolFramework }
} elseif ($msbuildEngine -eq "vs") {
try {
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
Expand Down Expand Up @@ -676,8 +682,14 @@ function Read-ArcadeSdkVersion() {
}

function InitializeToolset() {
if (Test-Path variable:global:_ToolsetBuildProj) {
return $global:_ToolsetBuildProj
# For Unified Build/Source-build support, check whether the environment variable is
# set. If it is, then use this as the toolset build project.
if ($env:_InitializeToolset -ne $null) {
return $global:_InitializeToolset = $env:_InitializeToolset
}

if (Test-Path variable:global:_InitializeToolset) {
return $global:_InitializeToolset
}

$nugetCache = GetNuGetPackageCachePath
Expand All @@ -688,7 +700,7 @@ function InitializeToolset() {
if (Test-Path $toolsetLocationFile) {
$path = Get-Content $toolsetLocationFile -TotalCount 1
if (Test-Path $path) {
return $global:_ToolsetBuildProj = $path
return $global:_InitializeToolset = $path
}
}

Expand All @@ -711,7 +723,7 @@ function InitializeToolset() {
throw "Invalid toolset path: $path"
}

return $global:_ToolsetBuildProj = $path
return $global:_InitializeToolset = $path
}

function ExitWithExitCode([int] $exitCode) {
Expand Down Expand Up @@ -763,12 +775,10 @@ function MSBuild() {
# new scripts need to work with old packages, so we need to look for the old names/versions
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')),
(Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path netcoreapp2.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
(Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path netcoreapp3.1 'Microsoft.DotNet.Arcade.Sdk.dll'))
(Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll'))
(Join-Path $basePath (Join-Path net7.0 'Microsoft.DotNet.Arcade.Sdk.dll')),
(Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.ArcadeLogging.dll')),
(Join-Path $basePath (Join-Path net8.0 'Microsoft.DotNet.Arcade.Sdk.dll'))
)
$selectedPath = $null
foreach ($path in $possiblePaths) {
Expand Down Expand Up @@ -827,7 +837,8 @@ function MSBuild-Core() {
}
}

$env:ARCADE_BUILD_TOOL_COMMAND = "$($buildTool.Path) $cmdArgs"
# Be sure quote the path in case there are spaces in the dotnet installation location.
$env:ARCADE_BUILD_TOOL_COMMAND = "`"$($buildTool.Path)`" $cmdArgs"

$exitCode = Exec-Process $buildTool.Path $cmdArgs

Expand All @@ -842,7 +853,8 @@ function MSBuild-Core() {
}

# When running on Azure Pipelines, override the returned exit code to avoid double logging.
if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null) {
# Skip this when the build is a child of the VMR orchestrator build.
if ($ci -and $env:SYSTEM_TEAMPROJECT -ne $null -and !$productBuild -and $properties -notlike "*DotNetBuildRepo=true*") {
Write-PipelineSetResult -Result "Failed" -Message "msbuild execution failed."
# Exiting with an exit code causes the azure pipelines task to log yet another "noise" error
# The above Write-PipelineSetResult will cause the task to be marked as failure without adding yet another error
Expand Down
Loading
Loading