Also fix a couple of compiler warnings:
passkit.cs(2797,15): warning CS0109: The member 'PKShareablePassMetadataPreview.PassThumbnailImage' does not hide an accessible member. The new keyword is not required.
passkit.cs(2800,14): warning CS0109: The member 'PKShareablePassMetadataPreview.LocalizedDescription' does not hide an accessible member. The new keyword is not required.
It's old, hasn't been executed in years and quite bitrotten by now (it only
builds legacy Xamarin samples for instance).
We could port it to .NET, but first we'd need sample apps, and there
aren't many of those yet.
This pull request updates the following dependencies
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.NET.ILLink.Tasks**: from 9.0.0-rc.2.24463.7 to 9.0.0-rtm.24473.2 (parent: Microsoft.NET.Sdk)
- **Microsoft.AspNetCore.App.Ref**: from 9.0.0-rtm.24466.12 to 9.0.0-rtm.24473.16 (parent: Microsoft.NET.Sdk)
- **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.2.24463.7 to 9.0.0-rtm.24473.2 (parent: Microsoft.NET.Sdk)
- **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: from 9.0.0-rc.2.24455.1 to 9.0.0-rtm.24469.1 (parent: Microsoft.NETCore.App.Ref)
- **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.2.24463.7 to 9.0.0-rtm.24473.2 (parent: Microsoft.NET.Sdk)
- **Microsoft.DotNet.Cecil**: from 0.11.5-alpha.24419.1 to 0.11.5-alpha.24467.1 (parent: Microsoft.NETCore.App.Ref)
## From https://github.com/dotnet/sdk
- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240924.4
- **Date Produced**: September 24, 2024 11:33:53 AM UTC
- **Commit**: 42b2349ec272dbb8bbc5d8df29adb7b77e3450cd
- **Branch**: refs/heads/release/9.0.1xx
- **Updates**:
- **Microsoft.NET.Sdk**: [from 9.0.100-rc.2.24468.2 to 9.0.100-rc.2.24474.4][1]
- **Microsoft.NET.ILLink.Tasks**: [from 9.0.0-rc.2.24463.7 to 9.0.0-rtm.24473.2][2]
- **Microsoft.AspNetCore.App.Ref**: [from 9.0.0-rtm.24466.12 to 9.0.0-rtm.24473.16][3]
- **Microsoft.NETCore.App.Ref**: [from 9.0.0-rc.2.24463.7 to 9.0.0-rtm.24473.2][2]
- **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: [from 9.0.0-rc.2.24455.1 to 9.0.0-rtm.24469.1][4]
- **Microsoft.NETCore.App.Ref**: [from 9.0.0-rc.2.24463.7 to 9.0.0-rtm.24473.2][2]
- **Microsoft.DotNet.Cecil**: [from 0.11.5-alpha.24419.1 to 0.11.5-alpha.24467.1][5]
[1]: c204043de1...42b2349ec2
[2]: 46cfb747b4...3d9da91a97
[3]: 0d72ad5e4c...91ef755ae0
[4]: 6e079c23ae...8e660ff41e
[5]: c667bfea9c...526b22d829
Context: https://github.com/CommunityToolkit/Maui.NativeLibraryInterop
Introduces a `@(XcodeProject)` build action which can be used to build
and consume the outputs of Xcode framework projects.
The following metadata are supported on this item:
```xml
<XcodeProject Include="path/to/myproject.xcodeproj" >
<Configuration>Release</Configuration>
<CreateNativeReference>true</CreateNativeReference>
<ForceLoad></ForceLoad>
<Frameworks></Frameworks>
<Kind>Framework</Kind>
<OutputPath></OutputPath>
<SchemeName></SchemeName>
<SmartLink></SmartLink>
<Visible></Visible>
</XcodeProject>
```
* `%(SchemeName)`: The name of the build scheme or target that should
be used to build the project.
* `%(Configuration)`: The name of the configuration to use to build the
project. The default value is `Release`.
* `%(CreateNativeReference)`: Output XCFRAMEWORK files will be added as
a `@(NativeReference)` to the project. Metadata supported by
`@(NativeReference)` like `%(Kind)`, `%(Frameworks)`, or `%(SmartLink)`
will be forwarded if set. The default value is `true`.
* `%(OutputPath)`: Can be set to override the XCARCHIVE and XCFRAMEWORK
output path of the Xcode project. The default value is
`$(IntermediateOutputPath)xcode/{SchemeName}-{Hash}`.
A new `_BuildXcodeProjects` target will attempt to build XCARCHIVE and
XCFRAMEWORK files for each `@(XcodeProject)` item. These outputs will be
created for the platform specified in the target framework. If multiple
target frameworks are specified, the project will be built for each
platform during each inner build.
A new `$(MaciOSPrepareForBuildDependsOn)` build extension point has been
added to allow customer projects to more easily hook into the beginning
of the build process.
---------
Co-authored-by: Peter Collins <pecolli@microsoft.com>
Co-authored-by: Alex Soto <alex@soto.dev>
Addresses #13856
This was originally created by @dotMorten in #20434.
Also make SecIdentity.Import use an in-memory keychain on macOS 15+, so that
SecIdentity.Import works like all othe other platforms (i.e. not requiring
access to the default keychain, which, among other things, is not ideal on
bots).
---------
Co-authored-by: Morten Nielsen <mort5161@esri.com>
Co-authored-by: dotMorten <mn@iter.dk>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
### Description
Previously we were including .pdbs in NativeAOT debug bundles, which was causing issues with debug builds of universal apps (during app bundle merging). This does not seem to be required, as in debug builds NativeAOT compiler uses information from pdbs to provide more data about the managed code during native debugging (like line numbers in stack traces, etc), embedding it into the native image, and does not require presence of said files during runtime.
### Changes
- This PR excludes pdbs from NativeAOT app bundles by removing them from `ResolvedFileToPublish` item group.
- The relevant unit tests are reenabled.
---
Fixes https://github.com/xamarin/xamarin-macios/issues/20903
This is part of the effort to migrate the Pair to Mac agents .NET.
As the Xamarin.iOS.Tasks.Windows project targets netstandard2.0, I'm
removing the Build agent reference, and modifying the Makefile to take
it from it's output directory. Note: the agent zip file is generated in
the intermediate output directory.
---------
Co-authored-by: Emanuel Fernandez Dell'Oca <ema@xamarin.com>
### Description
When building universal apps with NativeAOT, the output path for the app bundle (and zipped .ipa) is incorrect when building with NativeAOT.
For example publishing a MAUI template app with NativeAOT gives the following output (notice: `osx-arm64`):
```
Created the package: /Users/ivan/tmp/net9-rc1/MacCatRc1/bin/Release/net9.0-maccatalyst/osx-arm64/publish/MacCatRc1-1.0.pkg
```
and the following output tree:
```
bin/Release
bin/Release/net9.0-maccatalyst
bin/Release/net9.0-maccatalyst/maccatalyst-arm64/*
bin/Release/net9.0-maccatalyst/maccatalyst-x64/*
bin/Release/net9.0-maccatalyst/osx-arm64
bin/Release/net9.0-maccatalyst/osx-arm64/MacCatRc1.app/*
bin/Release/net9.0-maccatalyst/osx-arm64/publish/*
```
The problem comes from the fact that .NET SDK for NativeAOT builds will try to resolve `RuntimeIdentifier` when it is not specified in:
58eb155e30/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets (L95-L114)
which resolves to `osx-arm64` and gets later used to setup `IntermediateOutputPath` and `OutputPath` in:
58eb155e30/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets (L343-L346)
However, this shouldn't be done in universal builds, as the outer build does not have the runtime identifier specified and should not be altered.
### Changes
In this PR we are disabling the resolution of the `RuntimeIdentifier` when building universal apps with NativeAOT early in SDK in order to fix the output path.
I also included unit tests to verify the existence of .app bundles.
### Follow-up
There is an additional issue with Debug builds of universal apps with NativeAOT, where merging PDBs fails, which is reported in: https://github.com/xamarin/xamarin-macios/issues/20903
---
Contributes to: https://github.com/xamarin/xamarin-macios/issues/20903
---------
Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
This avoids the `UnpackLibraryResources` to fail.
```
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8020/tools/msbuild/iOS/Xamarin.Shared.targets(1985,3): error MSB4018: System.ArgumentException: Value does not fall within the expected range. (Parameter 'resourceName')
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8020/tools/msbuild/iOS/Xamarin.Shared.targets(1985,3): error MSB4018: at System.Reflection.TypeLoading.Ecma.EcmaAssembly.GetManifestResourceInfo(String resourceName)
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_17.5/17.5.8020/tools/msbuild/iOS/Xamarin.Shared.targets(1985,3): error MSB4018: at Xamarin.MacDev.Tasks.UnpackLibraryResources.GetAssemblyManifestResources(String fileName)+MoveNext() in /Users/builder/azdo/_work/1/s/xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Tasks/UnpackLibraryResources.cs:line 254
```
This was initially submitted by @jeromelaban in #21277.
---------
Co-authored-by: Jérôme Laban <jerome@platform.uno>
Append to the agent log, instead of creating the file, when an exception occcurs.
The problem is that creating the file fails if it already exists:
Exception occurred: Exception calling "Parse" with "1" argument(s): "String '' was not recognized as a valid DateTime."
New-Item: /Users/builder/azdo/_work/4/s/xamarin-macios/tools/devops/automation/scripts/generate_agent_logs.ps1:52
Line |
52 | New-Item -Path $Output -Value "$_"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The file '/Users/builder/azdo/_work/4/s/agent-logs.log' already exists.
This pull request updates the following dependencies
## Coherency Updates
The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)
- **Coherency Updates**:
- **Microsoft.AspNetCore.App.Ref**: from 9.0.0-rc.2.24466.2 to 9.0.0-rtm.24466.12 (parent: Microsoft.NET.Sdk)
## From https://github.com/dotnet/sdk
- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240918.2
- **Date Produced**: September 18, 2024 8:48:35 AM UTC
- **Commit**: c204043de141a4d00ae5b4ec1b82aab67cccac1d
- **Branch**: refs/heads/release/9.0.1xx
- **Updates**:
- **Microsoft.NET.Sdk**: [from 9.0.100-rc.2.24466.29 to 9.0.100-rc.2.24468.2][4]
- **Microsoft.AspNetCore.App.Ref**: [from 9.0.0-rc.2.24466.2 to 9.0.0-rtm.24466.12][5]
[4]: 92b8b5eb94...c204043de1
[5]: 9b3ca0b29a...0d72ad5e4c
The consumers of the API stage already passes a value, so a default is not needed.
This reduces the number of places we have to change every time we switch between stable and beta.
We need the AzDo.BearerToken in later steps that have the 'always()'
condition, and unless we actually get the AzDo.BearerToken under the same
conditions, those later steps will fail.
One example is if the job was cancelled, or previous steps failed (which is
common when running tests).
Example failure for re-enabling macOS bots:
```
AzDO.BearerToken : The term 'AzDO.BearerToken' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\AzDO\_work\_temp\9b207e8a-c163-4c97-93d3-e7e3bb908583.ps1:6 char:23
+ $azdoBearerToken = "$(AzDO.BearerToken)"
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (AzDO.BearerToken:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CommandNotFoundException
```
This problem causes a lot of bots to end up disabled, because we fail to
re-enable them after using them.
The test we had in our codebase for the SBApplication class was not only
outdated, but also incorrect.
With recent changes the test code doesn't work anymore, so delete it.
Instead, add XML documentation that explains how to use the class in a
way that works.
Fixes https://github.com/xamarin/xamarin-macios/issues/21242.