Skip to content

Commit

Permalink
Merge branch 'main' into dev--moljac--fix-resizetizer-invalid-png-fro…
Browse files Browse the repository at this point in the history
…m-svg
  • Loading branch information
moljac committed Mar 4, 2024
2 parents 0b688bb + 126f47a commit 3c9ff0a
Show file tree
Hide file tree
Showing 1,107 changed files with 23,837 additions and 7,439 deletions.
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "2.3.0",
"version": "4.0.0",
"commands": [
"dotnet-cake"
]
},
"powershell": {
"version": "7.3.9",
"version": "7.4.0",
"commands": [
"pwsh"
]
Expand All @@ -21,7 +21,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "8.0.0-prerelease.23523.1",
"version": "9.0.0-prerelease.24129.1",
"commands": [
"xharness"
]
Expand Down
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dotnet_diagnostic.CA1307.severity = error
dotnet_diagnostic.CA1309.severity = error
dotnet_diagnostic.CA1311.severity = error
dotnet_diagnostic.CA1815.severity = error
dotnet_diagnostic.CA1825.severity = error

# nullability checks

Expand Down Expand Up @@ -105,6 +106,7 @@ dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
dotnet_sort_system_directives_first = true
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false
csharp_prefer_braces = true:error

# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
Expand Down
18 changes: 18 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@ Please refer to our [Pull Request template](PULL_REQUEST_TEMPLATE.md).

Please check the "Allow edits from maintainers" checkbox on your pull request. This allows us to quickly make minor fixes and resolve conflicts for you.

### Performance-related Changes

Performance improvements can be tricky to get right, and can sometimes have unexpected consequences and impact code readability. If you're considering a performance-related change, here are a few things to keep in mind:

1. **Profile a real-world application**: Before making any performance-related changes, profile a real-world application (or at least a sample project) to understand where the bottlenecks are. This will help you understand if your change is actually improving performance, and if it's improving the right thing. We want to avoid micro-optimizations that don't actually improve real-world .NET MAUI applications.

See [our profiling wiki](https://aka.ms/profile-maui) for instructions on how to profile a .NET MAUI application.

2. **Benchmark your change**: If you're making a performance-related change, please include benchmarks in your pull request. This will help us understand the impact of your change, and will help us avoid performance regressions in the future.

Provide before & after numbers using BenchmarkDotNet where possible. See our existing [BenchmarkDotNet project](../src/Core/tests/Benchmarks/) for examples.

If a BenchmarkDotNet test case is not possible, share before & after profiling information from Visual Studio, `dotnet-trace`, etc. Keep in mind that sampling profilers can be inaccurate, so someone from the .NET MAUI team may need to reproduce your results before merging your change.

3. **Preserve existing behavior**: If you're making a performance-related change, please make sure that you're not changing the behavior of the code. For example, if you're changing the implementation of a method, make sure that the new implementation returns the same results as the old implementation. In some cases, you may need to add new unit tests to ensure that the behavior of the code hasn't changed.

4. **Avoid impacting readability**: Performance-related changes can sometimes make code harder to read and understand. In many cases, it will be worth it if the payoff is significant, but please be mindful of the trade-offs. Write code comments and unit tests to help others understand the code in the future.

## Proposals/Enhancements/Suggestions

To propose a change or new feature, open an issue using the [Feature request template](https://github.com/dotnet/maui/issues/new?assignees=&labels=proposal-open%2C+t%2Fenhancement+➕&template=feature_request.md&title=[Enhancement]+YOUR+IDEA!). You may also use the [Spec template](https://github.com/dotnet/maui/issues/new?assignees=&labels=proposal-open%2C+t%2Fenhancement+➕&template=spec.md&title=[Spec]++) if you have an idea of what the API should look like. Be sure to also browse current issues and [discussions](https://github.com/dotnet/maui/discussions) that may be related to what you have in mind.
Expand Down
53 changes: 32 additions & 21 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,48 @@

This page contains steps to build and run the .NET MAUI repository from source. If you are looking to build apps with .NET MAUI please head over to the links in the [README](https://github.com/dotnet/maui/blob/main/README.md) to get started.

## Visual Studio
Install Visual Studio with .NET8 support.
- Windows: install VS 17.8 latest preview or newer
## Initial setup
### Windows
- Install VS 17.8 or newer
- Follow [these steps](https://learn.microsoft.com/dotnet/maui/get-started/installation?tabs=vswin) to include MAUI
- Select the 20348 SDK option inside Individual Components or [install 20348 manually](https://go.microsoft.com/fwlink/?linkid=2164145). If you know you have 20348 installed but are still getting an error around this SDK missing, trying uninstalling and reinstalling the SDK.
- [macOS](https://learn.microsoft.com/dotnet/maui/get-started/installation?tabs=vsmac)

## iOS / MacCatalyst

iOS and MacCatalyst will require current stable Xcode. You can get this [here](https://developer.apple.com/download/more/?name=Xcode).

## Android

If you're missing any of the Android SDKs, Visual Studio should prompt you to install them. If it doesn't prompt you then use the [Android SDK Manager](https://learn.microsoft.com/xamarin/android/get-started/installation/android-sdk) to install the necessary SDKs.

- If building iOS with pair to Mac: Install current stable Xcode on your Mac. Install from the [App Store](https://apps.apple.com/us/app/xcode/id497799835?mt=12) or [Apple Developer portal](https://developer.apple.com/download/more/?name=Xcode)
- If you're missing any of the Android SDKs, Visual Studio should prompt you to install them. If it doesn't prompt you then use the [Android SDK Manager](https://learn.microsoft.com/xamarin/android/get-started/installation/android-sdk) to install the necessary SDKs.

### Mac
- Install VS Code and dependencies
- Follow [these steps](https://learn.microsoft.com/en-us/dotnet/maui/get-started/installation?view=net-maui-8.0&tabs=visual-studio-code), installing VS Code, MAUI extension, .NET8, Xcode, OpenJDK, and Android SDK
- For Xcode, you can install from the [App Store](https://apps.apple.com/us/app/xcode/id497799835?mt=12) or [Apple Developer portal](https://developer.apple.com/download/more/?name=Xcode)

## Building the Build Tasks
Before opening the solution in Visual Studio you **MUST** build the build tasks. You have two options:
Before opening the solution in Visual Studio / VS Code you **MUST** build the build tasks.

### Windows
- Do this to build the build tasks and launch Visual Studio, automatically opening the default solution:

```dotnetcli
dotnet tool restore
dotnet cake --target=VS --workloads=global
```

*NOTE*: `--workloads=global` means use the normal (globally installed) .NET workloads.

- OR do this to just build the build tasks. You can then launch Visual Studio manually and open the solution of your choosing:

```dotnetcli
dotnet tool restore
dotnet build ./Microsoft.Maui.BuildTasks.slnf
```

- OR do this to build the tasks and open the Visual Studio Code codespace:
### Mac
- Do this to build the tasks and open the Visual Studio Code codespace:

```dotnetcli
dotnet tool restore
dotnet cake --target=VSCode --workloads=global
```

*NOTE*: `--workloads=global` means use the normal (globally installed) .NET workloads.


## Available Solutions
- Microsoft.Maui.sln
- Kitchen sink solution. This includes all of the `Compatibility` projects and all of the platforms that we compile for. It is very unlikely you will need to use this solution for development.
Expand All @@ -51,14 +52,20 @@ Before opening the solution in Visual Studio you **MUST** build the build tasks.
- Microsoft.Maui-windows.slnf
- `Microsoft.Maui-dev.sln` with all of the targets you can't build on `Windows` removed (GTK/Catalyst). Default solution on Windows.
- Microsoft.Maui-mac.slnf
- `Microsoft.Maui-dev.sln` with all of the `Windows` targets filtered out. Default solution on Mac.
- `Microsoft.Maui-dev.sln` with all of the `Windows` targets filtered out. Legacy solution for VS Mac.
- Microsoft.Maui-vscode.sln
- Solution for VS Code (VS Code doesn't support solution filters)

*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 @@ -113,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 @@ -143,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
29 changes: 15 additions & 14 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,22 @@ body:
label: Version with bug
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
- 7.0.101
- 7.0.100
- 7.0.96
- 7.0.92
- 7.0.86
- 7.0.81
- 7.0.59
- 7.0.49
- 7.0.52
- 7.0.58
- 8.0.0-rc.2.9511
- 8.0.0-rc.2.9373
- 8.0.0-rc.1.9171
- 8.0.0-preview.7.8842
- 8.0.0-preview.6.8686
- 8.0.0-preview.5.8529
- 8.0.0-preview.4.8333
- 8.0.0-preview.3.8149
- 8.0.0-preview.2.7871
- 8.0.0-preview.1.7762
- 7.0.52
- 7.0.49
- Nightly / CI build (Please specify exact version)
- Unknown/Other
validations:
required: true
Expand All @@ -84,8 +80,9 @@ 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
- 6.0
- 7.0.49
Expand All @@ -108,6 +105,10 @@ body:
- 8.0.0-rc.1.9171
- 8.0.0-rc.2.9373
- 8.0.0-rc.2.9511
- 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 Expand Up @@ -142,7 +143,7 @@ body:
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
description: Including a binary log or 'binlog' to your issue (see [Capturing Binary Logs](https://github.com/dotnet/maui/wiki/Capturing-Binary-Logs) for more info) is helpful in diagnosing your issue. You can also paste any relevant log output below. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: markdown
attributes:
Expand Down
Loading

0 comments on commit 3c9ff0a

Please sign in to comment.