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

Merge main to net8 #12032

Merged
merged 118 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
2b4e0be
Update Entry.cs (#11250)
github-actions[bot] Nov 10, 2022
a4d78ae
Revert "[android] bring back `$(AndroidLinkResources)` by default" (#…
jonathanpeppers Nov 10, 2022
c64e102
Remove dead XML Doc link (#11233)
github-actions[bot] Nov 11, 2022
5302c47
[net7.0] Update dependencies from xamarin/xamarin-macios (#11220)
dotnet-maestro[bot] Nov 11, 2022
44599ac
restore unittests for native views binding (#11341)
StephaneDelcroix Nov 14, 2022
03db961
Merge net7.0 into main (#11290)
mattleibow Nov 14, 2022
24cee8b
Bump Microsoft.WindowsAppSDK from 1.1.5 to 1.2.221109.1 (#11280)
dependabot[bot] Nov 15, 2022
0971d66
Bump Microsoft.CodeAnalysis.CSharp from 4.2.0 to 4.4.0 (#11365)
dependabot[bot] Nov 15, 2022
89326a5
Bump Xamarin.Build.Download from 0.11.3 to 0.11.4 (#11367)
dependabot[bot] Nov 15, 2022
0dfcf8a
Bump Microsoft.Net.Compilers.Toolset from 4.3.1 to 4.4.0 (#11366)
dependabot[bot] Nov 15, 2022
6115146
Set window soft input via window mapper (#11356)
PureWeen Nov 15, 2022
fb7acc0
Update Microsoft.Windows.SDK.BuildTools (#11396)
mattleibow Nov 16, 2022
bfccbb6
Bump Xamarin.UITest from 3.2.9 to 4.0.0 (#11407)
dependabot[bot] Nov 16, 2022
44429a4
Update dependencies from https://github.com/dotnet/xharness build 202…
dotnet-maestro[bot] Nov 16, 2022
aa31270
[main] Update dependencies from xamarin/xamarin-macios (#11338)
dotnet-maestro[bot] Nov 16, 2022
50f32fc
Add NeedsExactMeasure check for Editor on Android (#10876)
hartez Nov 16, 2022
6013f56
Update Essentials Barometer API Docs (#11378)
jfversluis Nov 17, 2022
502d973
Update Essentials AppActions API Docs (#11373)
jfversluis Nov 17, 2022
63ee346
Update Essentials Accelerometer API Docs (#11370)
jfversluis Nov 17, 2022
0d78b93
Remove unnecessary MeasureOverride from RefreshView; (#11357)
hartez Nov 17, 2022
0203472
Don't set editor action to handled (#11386)
PureWeen Nov 17, 2022
0f8fbc3
Update Essentials Battery API Docs (#11380)
jfversluis Nov 18, 2022
881316f
Update Essentials AppInfo API Docs (#11374)
jfversluis Nov 18, 2022
5d830d5
Update Essentials Browser API Docs (#11394)
jfversluis Nov 18, 2022
289381e
[iOS] Fix issue clearing MapElements in Map (#11471) Fixes #11296
jsuarezruiz Nov 18, 2022
a3c2204
Update Essentials Contacts API Docs (#11417)
jfversluis Nov 18, 2022
418488d
Update Essentials Connectivity API Docs (#11415)
jfversluis Nov 18, 2022
18b3241
Update Essentials Clipboard Docs (#11395)
jfversluis Nov 18, 2022
6354e78
Fix window page changed event subscriptions (#11483)
PureWeen Nov 18, 2022
1779012
Fix the ordering registration for tests (#11484)
PureWeen Nov 18, 2022
66d638d
CodeQL only on main/non-public builds (#11273)
Redth Nov 21, 2022
8e97f64
Update dependencies from https://github.com/dotnet/xharness build 202…
dotnet-maestro[bot] Nov 21, 2022
02aca3a
Ensure that UIScrollView ContentSize is set (#11175)
hartez Nov 21, 2022
08ef5e0
Fix iOS/macOS Images not cropped inside of a Frame #6580 (#11352)
tj-devel709 Nov 21, 2022
f6bab09
[Build] Clean up provisioning script (#11523)
rmarinho Nov 21, 2022
c83e739
[Housekeeping] Remove calls to Console.WriteLine to decrease app size…
jsuarezruiz Nov 21, 2022
535e939
Clean up the files in the xml-docs artifacts (#11257)
jfversluis Nov 21, 2022
f61f3e8
[foldable] add TypeConverter to Pane1Length/Pane2Length properties (#…
conceptdev Nov 21, 2022
5105c37
[Tizen] Add handing Label.TextType (#11389)
JoonghyunCho Nov 21, 2022
dcc5d7b
Add .NET 7 announcement (#11539)
hartez Nov 22, 2022
c4d9b57
[Tizen] Add Shell FlyoutBackDrop (#11390)
JoonghyunCho Nov 22, 2022
66edae1
Bump Microsoft.WindowsAppSDK from 1.2.221109.1 to 1.2.221116.1 (#11469)
dependabot[bot] Nov 22, 2022
66e2486
Allow transparent modal pages on iOS (#11107) Fixes #8526 Fixes #11040
jsuarezruiz Nov 22, 2022
e85c4da
Update Essentials DeviceInfo API Docs (#11431)
jfversluis Nov 22, 2022
c041e9a
Update Essentials DeviceDisplay API Docs (#11429)
jfversluis Nov 22, 2022
516017f
Possible fix for issue #10960 (#11361)
nogginbox Nov 22, 2022
d7bd28c
Bump Microsoft.Bcl.AsyncInterfaces from 6.0.0 to 7.0.0 (#11193)
dependabot[bot] Nov 22, 2022
923f054
Reboot on-prem agent after job completion (#11359)
mjbond-msft Nov 22, 2022
acf9e4a
[main] Update dependencies from xamarin/xamarin-macios (#11553)
dotnet-maestro[bot] Nov 22, 2022
4edc718
Dotnet format Microsoft.Maui.sln (#11110)
rmarinho Nov 22, 2022
562f8ce
Notify Button ImageSource changes correctly (#11146)
jsuarezruiz Nov 22, 2022
64e5175
[Android] Fix Stepper IsEnabled property changes (#11053)
jsuarezruiz Nov 22, 2022
7c621e6
[main] Update dependencies from xamarin/xamarin-macios (#11563)
dotnet-maestro[bot] Nov 23, 2022
1050416
Bump autoformatting action to v0.2. (#11580)
rolfbjarne Nov 23, 2022
9875e72
Fix ObjectDisposedException on Android resizing images (#11577)
jsuarezruiz Nov 23, 2022
4ac9f5b
[Android] Fix crash using Page IsBusy property (#9783)
jsuarezruiz Nov 23, 2022
e6c779d
Align Shapes Fill property behavior with Xamarin.Forms (#10328)
jsuarezruiz Nov 23, 2022
193924b
Fix brushes in Frame (#7925)
jsuarezruiz Nov 23, 2022
9237735
Fix Managing Layout Children (#11581)
JoonghyunCho Nov 23, 2022
2921206
Avoid propagate Map tap event tapping a Pin on iOS (#11582) Fixes #11532
jsuarezruiz Nov 23, 2022
e53dc68
Exclude incompatible files from daily dotnet format workflow (#11590)
Eilon Nov 24, 2022
76657b5
Only include MauiXaml/Css when $(UseMaui)=true (#11638)
mattleibow Nov 25, 2022
57a319b
Add appropriate versioning attributes (#11589)
rachelkang Nov 25, 2022
de12801
Add a condition to skip the AutoImport.props (#11665)
mattleibow Nov 25, 2022
269dcf6
Fix MauiIcon ForegroundScale on systems with comma as decimal separator
AndreKraemer Nov 27, 2022
9bbb47c
[Build] Update yaml for net8 (#11609)
rmarinho Nov 28, 2022
b6bbf79
Make iOS Label HTML behavior compatible with Forms (#11569) Fixes #4230
hartez Nov 28, 2022
123fc7b
_itemsSource may be null in CarouselViewLoopManager (#11000)
BioTurboNick Nov 28, 2022
ab534a2
Fix MauiIcon ForegroundScale on systems with comma as decimal separat…
mattleibow Nov 28, 2022
1f2a6ae
[create-pull-request] automated change (#11671)
github-actions[bot] Nov 28, 2022
73a7eb3
Fix issue loading local files in iOS WebView (#10804)
jsuarezruiz Nov 28, 2022
4e1770e
[iOS] RadioButton a11y (#10832)
rachelkang Nov 28, 2022
ad785e1
[main] Update dependencies from xamarin/xamarin-macios (#11696)
dotnet-maestro[bot] Nov 29, 2022
a83cc7b
Using local function to fix multi-thread issues (#11497) Fixes #11321
lindexi Nov 29, 2022
1186b38
[create-pull-request] automated change (#11713)
github-actions[bot] Nov 29, 2022
c4d0734
[main] Update dependencies from xamarin/xamarin-macios (#11734)
dotnet-maestro[bot] Nov 30, 2022
ffacf05
[WinUI] Fix RefreshView crash if no content is specified (#11735)
PureWeen Nov 30, 2022
4eddd7f
Ensure invisible views don't get rows/columns when generating AndExpa…
hartez Nov 30, 2022
f9c7e4d
Fix Element.ChildRemoved event sender (#11741) Fixes #11720
mattjohnsonpint Nov 30, 2022
ffccc2e
[main] Fix up the Shipped/Unshipped APIs
mattleibow Nov 30, 2022
69ac918
Mark the API changes as unshipped
mattleibow Nov 30, 2022
f2ac290
Correctly disable MenuBarItems on Windows (#11695)
jsuarezruiz Nov 30, 2022
3285b9d
Notify StrokeDashPattern changes with StrokeDashArray changes (#11694)
jsuarezruiz Dec 1, 2022
ca12323
Invalidate Button background drawable if size changes (#11604)
jsuarezruiz Dec 1, 2022
3faf9ff
Add API changes doc (#11768)
mattleibow Dec 1, 2022
05ad340
[build] Add support for Visual Studio on win-arm64 (#11803)
jonathanpeppers Dec 1, 2022
c475786
Merge remote-tracking branch 'origin/main' into dev/main-unshipped
mattleibow Dec 2, 2022
be87b4f
Update templates to have separate default for framework selection (#1…
jfversluis Dec 2, 2022
5a6cf27
Add maestro-changelog workflow action (#11757)
rmarinho Dec 5, 2022
9a2912d
Bump Xamarin.UITest from 4.0.0 to 4.0.1 (#11826)
dependabot[bot] Dec 5, 2022
1f1ea8b
Reconcile PointerOver, Pressed, and Focused states (#11840)
hartez Dec 5, 2022
16760d3
Add empty PointerOver states to Buttons to reduce confusion (#11842)
hartez Dec 5, 2022
0852b95
Merge remote-tracking branch 'origin/main' into dev/main-unshipped
mattleibow Dec 5, 2022
9471446
Remove Android LaunchAdjacent flag for Essentials (#11783)
jfversluis Dec 5, 2022
9d58f96
[create-pull-request] automated change (#11775)
github-actions[bot] Dec 5, 2022
3d102c1
[main] Update dependencies from xamarin/xamarin-macios (#11765)
dotnet-maestro[bot] Dec 5, 2022
c38e42f
[main] Update PublicAPI.Shipped.txt files (#11760)
mattleibow Dec 5, 2022
f6ce425
[Build] Remove unused variable (#11727)
rmarinho Dec 5, 2022
4e0446b
[build] Fix changelog workflow (#11895)
rmarinho Dec 6, 2022
e2ec149
[create-pull-request] automated change (#11888)
github-actions[bot] Dec 6, 2022
ac2ee72
[main] Update dependencies from xamarin/xamarin-macios (#11892)
dotnet-maestro[bot] Dec 6, 2022
cd2b993
Bump Microsoft.Web.WebView2 from 1.0.1418.22 to 1.0.1462.37 (#11898)
dependabot[bot] Dec 6, 2022
cd5dd03
Only add PointerGesture if PointerOver VisualState exists (#11591)
PureWeen Dec 6, 2022
3f8a4ea
[Android] Fix crash disconnecting the IndicatorView (#11346)
jsuarezruiz Dec 6, 2022
41eea33
Remove non platform TFM and sync up SupportedOSPlatformVersion (#11910)
PureWeen Dec 7, 2022
63f2ed5
Fix UpdateSemantics for UIStepper and UIPagerControl (#11937)
PureWeen Dec 7, 2022
d701004
Make OnShouldReceiveMapTouch static (#11974)
PureWeen Dec 8, 2022
d0e6e4c
Bump Microsoft.CodeAnalysis.NetAnalyzers (#11958)
dependabot[bot] Dec 8, 2022
6e9dd16
Update Essentials MainThread API Docs (#11934)
jfversluis Dec 9, 2022
962802d
Update Essentials Flashlight API Docs (#11920)
jfversluis Dec 9, 2022
8d3ada2
Prepare MAUI to support building with NuGets (#11946)
mattleibow Dec 9, 2022
c1c2c09
Bump Xamarin.Firebase.AppIndexing from 120.0.0.9 to 120.0.0.10 (#11929)
dependabot[bot] Dec 12, 2022
45893ea
Fix crash typing in Shell SearchHandler on iOS (#11927)
jsuarezruiz Dec 12, 2022
07951fa
Fix crash using BackButtonBehavior and navigating to root (#11438) Fi…
jsuarezruiz Dec 12, 2022
505e10f
[create-pull-request] automated change (#11949)
github-actions[bot] Dec 12, 2022
a63b120
Vibrate - Detect zero duration and return early (#11314)
BioTurboNick Dec 12, 2022
509d91e
Fix SwipeItemView size issues on Android (#10522) Fixes #10065 Fixes …
jsuarezruiz Dec 12, 2022
240c2e6
Merge branch 'main' into net8-main
rmarinho Dec 12, 2022
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
63 changes: 63 additions & 0 deletions .github/workflows/maestro-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Add changelog for Maestro bump
on: pull_request

permissions:
pull-requests: write
contents: write

jobs:
add-changelog:
name: Add changelog
runs-on: ubuntu-latest
if: github.actor == 'dotnet-maestro[bot]'

steps:
- name: 'Compute changelog'
run: |
set -exo pipefail
git clone https://github.com/spouliot/dotnet-tools
cd dotnet-tools/changelog
dotnet run https://github.com/$GITHUB_REPOSITORY/pull/${GITHUB_REF_NAME/\/*/} > changelog.txt 2>&1

CHANGELOG_FILE=changelog2.txt
rm -f "$CHANGELOG_FILE"
cat changelog.txt | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/\\n/g' >> "$CHANGELOG_FILE"
cat "$CHANGELOG_FILE"

cp "$CHANGELOG_FILE" /tmp/changelog.txt

- name: 'Add changelog'
uses: actions/[email protected]
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');
const changelog_message = fs.readFileSync('/tmp/changelog.txt', 'utf8');
// check if we've already added a changelog to this PR, and if so, update that comment, otherwise add a new comment
var commentId = ""
await github.paginate (github.rest.issues.listComments,
{
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
}).then ((comments) =>
{
const changelogComment = comments.find(comment => comment.body.includes (".net ChangeLog for") && comment.user.login == 'github-actions[bot]')
if (changelogComment)
commentId = changelogComment.id
})
if (commentId == "") {
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: changelog_message
})
} else {
github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: commentId,
body: changelog_message
})
}
151 changes: 151 additions & 0 deletions docs/design/APIChangeTracking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# API Change Tracking

.NET MAUI makes use of the `Microsoft.CodeAnalysis.PublicApiAnalyzers` NuGet to generate and track changes to public APIs to ensure that existing assemblies continue working without accidental breaking changes.

To learn more about breaking change guidelines in .NET, including what is considered a "breaking change", check out these resources:

* [.NET Runtime Breaking Change Rules](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/breaking-change-rules.md)
* [.NET Runtime Breaking Change Definitions](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/breaking-change-definitions.md)
* [.NET Library Guidance Breaking changes](https://learn.microsoft.com/dotnet/standard/library-guidance/breaking-changes)


## Changing APIs

In most cases, you are adding new APIs, so this is pretty simple and intellisense can be used. For changes and removes, these need to be properly tracked.

### Adding New APIs

If you are adding a new API, just go ahead and create the type/member and then use intellisense `ctrl + .` to fix the warning messages. You will have to do this for each TFM in the dropdown.

If this does not work, you can do it manually by adding the fully qualified type/member name to the `PublicAPI.Unshipped.txt` file in each TFM where it is relevant.

For example, we we are adding a new constructor to `PointerEventArgs`, we would add this line to unshipped file:

```
Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs(int clicks) -> void
```

### Changing / Removing APIs

When an API is changed, the old API needs to be "removed" and then the new API can be added. Removing an API is as easy as copying the type/member from the `PublicAPI.Shipped.txt` file and added to the `PublicAPI.Unshipped.txt` with a prefixof `*REMOVED*`.

For example, if we are removing a default constructor for some reason on the `PointerEventArgs` type:

```
Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void
```

All we would do is copy this line from the shipped file and add it to the unshipped file with the prefix:

```
*REMOVED*Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void
```

## Preparing API Releases

Once everything is ready to be released and the branch is created, we can merge all the unshipped files into the shipped files. Then we can run a git diff on the files and see all the changes made between releases.

### Merging the API Files

To merge the API files, we just need to run a script - and then commit the changes to git:

```
.\eng\scripts\mark-shipped.ps1
```

Taking the examples above and assuming we had these files:

`PublicAPI.Shipped.txt`:
```
#nullable enable
Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void
```

`PublicAPI.Unshipped.txt`:
```
#nullable enable
Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs(int clicks) -> void
*REMOVED*Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void
```

After running the script, we will end up with this:

`PublicAPI.Shipped.txt`:
```
#nullable enable
Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs(int clicks) -> void
```

`PublicAPI.Unshipped.txt`:
```
#nullable enable
```

Note the "replaced" constructor after the API has been removed and the new one added.

### Creating an API Diff

Once we have committed the API files, we can use git to generate a diff:

```
git diff <previous-branch> <new-branch> --output=api-changes.diff **\PublicAPI.*.txt
```

And again the example above, we will have this result:

```diff
diff --git a/src/PublicAPI/net/PublicAPI.Shipped.txt b/src/Core/src/PublicAPI/net/PublicAPI.Shipped.txt
index shashasha..shashasha
--- a/src/Core/src/PublicAPI/net/PublicAPI.Shipped.txt
+++ b/src/Core/src/PublicAPI/net/PublicAPI.Shipped.txt
@@ -1,2 +1,4 @@
#nullable enable
-Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs() -> void
+Microsoft.Maui.Controls.PointerEventArgs.PointerEventArgs(int clicks) -> void
```

This diff can then be used to create a correct breaking API doc.

## Enabling Tracking

In order to enable tracking of a particular project, just add the following to the bottom of the .csproj:

```xml
<Import Project="$(MauiSrcDirectory)PublicAPI.targets" />
```

This will automatically start your project failing to build about missing things. This is just because the API tracker files are missing. We can use the `ctrl + .` or intellisense to automatically create them. Select each TFM from the dropdown in turn and pick any warning to use intellisense to generate the file for the entire project.

For each TFM, there will be a set of files that are created in a `PublicAPI` folder:

```
PublicAPI
├─ net
│ ├─ PublicAPI.Shipped.txt
│ └─ PublicAPI.Unshipped.txt
├─ net-android
│ ├─ PublicAPI.Shipped.txt
│ └─ PublicAPI.Unshipped.txt
├─ net-ios
│ ├─ PublicAPI.Shipped.txt
│ └─ PublicAPI.Unshipped.txt
├─ net-maccatalyst
│ ├─ PublicAPI.Shipped.txt
│ └─ PublicAPI.Unshipped.txt
├─ net-tizen
│ ├─ PublicAPI.Shipped.txt
│ └─ PublicAPI.Unshipped.txt
├─ net-windows
│ ├─ PublicAPI.Shipped.txt
│ └─ PublicAPI.Unshipped.txt
└─ netstandard
├─ PublicAPI.Shipped.txt
└─ PublicAPI.Unshipped.txt
```

If for some reason a file is not generated, they can be created manually with the contents of:

```
#nullable enable

```
1 change: 1 addition & 0 deletions eng/PublicAPI.empty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#nullable enable
4 changes: 2 additions & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
<MicrosoftAspNetCoreMetadataPackageVersion>7.0.0</MicrosoftAspNetCoreMetadataPackageVersion>
<MicrosoftJSInteropPackageVersion>7.0.0</MicrosoftJSInteropPackageVersion>
<!-- Other packages -->
<MicrosoftCodeAnalysisNetAnalyzersVersion>7.0.0-preview1.22559.1</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisNetAnalyzersVersion>7.0.0</MicrosoftCodeAnalysisNetAnalyzersVersion>
<MicrosoftCodeAnalysisPublicApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisPublicApiAnalyzersVersion>
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>3.3.3</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<SystemNumericsVectorsVersion>4.5.0</SystemNumericsVectorsVersion>
<_MicrosoftWebWebView2Version>1.0.1418.22</_MicrosoftWebWebView2Version>
<_MicrosoftWebWebView2Version>1.0.1462.37</_MicrosoftWebWebView2Version>
<!-- GLIDE - the android maven artifact in /src/Core/AndroidNative/maui/build.gradle -->
<!-- must be kept in sync with the binding library version to it here: -->
<_XamarinAndroidGlideVersion>4.13.2.2</_XamarinAndroidGlideVersion>
Expand Down
2 changes: 1 addition & 1 deletion eng/automation/vs-workload.template.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<ComponentResources Include="maui-maccatalyst" Version="@VS_COMPONENT_VERSION@" Category=".NET" Title=".NET MAUI SDK for Mac Catalyst" Description=".NET SDK Workload for building MAUI applications that target Mac Catalyst." />
<ComponentResources Include="maui-ios" Version="@VS_COMPONENT_VERSION@" Category=".NET" Title=".NET MAUI SDK for iOS" Description=".NET SDK Workload for building MAUI applications that target iOS." />
<ComponentResources Include="maui-windows" Version="@VS_COMPONENT_VERSION@" Category=".NET" Title=".NET MAUI SDK for Windows" Description=".NET SDK Workload for building MAUI applications that target Windows." />
<WorkloadPackages Include="$(NuGetPackagePath)\Microsoft.NET.Sdk.Maui.Manifest*.nupkg" Version="@VS_COMPONENT_VERSION@" />
<WorkloadPackages Include="$(NuGetPackagePath)\Microsoft.NET.Sdk.Maui.Manifest*.nupkg" Version="@VS_COMPONENT_VERSION@" SupportsMachineArch="true" />
<MultiTargetPackNames Include="Maui.Sdk;Maui.Templates" />
</ItemGroup>
</Project>
6 changes: 2 additions & 4 deletions eng/pipelines/common/pack.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
parameters:
platform: ''
poolName: ''
provisionatorChannel: latest
artifact: 'nuget'

steps:
- template: provision.yml
parameters:
platform: ${{ parameters.platform }}
poolName: ${{ parameters.poolName }}
provisioning: true
provisionatorChannel: ${{ parameters.provisionatorChannel }}

- pwsh: ./build.ps1 --target=dotnet --configuration="Release" --verbosity=diagnostic
displayName: 'Install .NET'
retryCountOnTaskFailure: 3
Expand Down
77 changes: 41 additions & 36 deletions eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
parameters:
platform : ''
skipXcode: false
poolName: ''
skipXcode: false
skipVS: true
skipProvisioning: $(skipProvisionator)
provisionatorPath: $(provisionator.path)
provisionatorXCodePath: $(provisionator.xcode)
provisionatorVSPath: $(provisionator.vs)
provisionatorChannel: 'latest'
provisionatorExtraArguments: $(provisionator.extraArguments)

steps:
# Prepare macOS
Expand All @@ -18,24 +24,23 @@ steps:
- ${{ if ne(parameters.skipXcode, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Xcode'
condition: ne(variables['REQUIRED_XCODE'], '')
inputs:
provisioning_script: $(provisionator.xcode)
provisioning_extra_args: $(provisionator.extraArguments)
provisioning_script: ${{ parameters.provisionatorXCodePath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
# Provision Additional Software
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
condition: eq(variables['provisioning'], 'true')
continueOnError: true
inputs:
provisioning_script: $(provisionator.path)
provisioning_extra_args: $(provisionator.extraArguments)
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
- ${{ if ne(parameters.skipProvisioning, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
continueOnError: true
inputs:
provisioning_script: ${{ parameters.provisionatorPath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)

# Setup SDK Paths
- bash: |
Expand Down Expand Up @@ -89,30 +94,30 @@ steps:
msiexec.exe /package $output /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1
}
displayName: 'Install PowerShell Core'
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Visual Studio'
condition: eq(variables['provisioningVS'], 'true')
inputs:
provisioning_script: $(provisionator.vs)
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
- pwsh: |
$msbuild = "$env:ProgramFiles/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/MSBuild.exe"
echo "##vso[task.setvariable variable=MSBUILD_EXE]$msbuild"
displayName: 'Setup MSBuild Paths'
condition: eq(variables['provisioningVS'], 'true')
- ${{ if ne(parameters.skipVS, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Visual Studio'
condition: eq(variables['provisioningVS'], 'true')
inputs:
provisioning_script: ${{ parameters.provisionatorVSPath }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
- pwsh: |
$msbuild = "$env:ProgramFiles/Microsoft Visual Studio/2022/Preview/MSBuild/Current/Bin/MSBuild.exe"
echo "##vso[task.setvariable variable=MSBUILD_EXE]$msbuild"
displayName: 'Setup MSBuild Paths'

# Provision Additional Software
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
condition: eq('${{ parameters.provisioning }}', 'true')
inputs:
provisioning_script: $(provisionator.path)
provisioning_extra_args: $(provisionator.extraArguments)
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
- ${{ if ne(parameters.skipProvisioning, 'true') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
displayName: 'Provision Additional Software'
inputs:
provisioning_script: ${{ parameters.provisionatorPath }}
provisioning_extra_args: ${{ parameters.provisionatorExtraArguments }}
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)

# Prepare Both
- task: UseDotNet@2 # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ variables:
value: $(Build.ArtifactStagingDirectory)/logs
- name: TestResultsDirectory
value: $(Build.ArtifactStagingDirectory)/test-results
- name: skipProvisionator
value: $[ne(variables['provisioning'], 'true')]
- name: provisionator.xcode
value: '$(System.DefaultWorkingDirectory)/eng/provisioning/xcode.csx'
- name: provisionator.path
Expand Down
Loading