Граф коммитов

15793 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge ce85073609
[msbuild] Remove some logic for watchOS on .NET. (#18473)
We don't support watchOS on .NET, so this is just useless code.
2023-06-22 08:15:56 +02:00
Rolf Bjarne Kvinge 4e7a988c05
Update DOWNLOADS.md with new releases. (#18448) 2023-06-21 20:45:58 +02:00
Rolf Bjarne Kvinge a66950d2de
[bgen] Remove useless catch/(re)throw. (#18467)
There's no purpose to catching an exception just to throw it, so remove
the entire try/catch handler.

Fixes this compiler warning:

    src/bgen/Generator.cs(1284,4): warning CA2200: Re-throwing caught exception changes stack information
2023-06-20 18:07:28 +02:00
EmilienDup 7cea2a8c3a
NSUrlSessionHandler should propagate network exceptions (#18459)
fixes #18458
2023-06-20 07:27:46 +02:00
Manuel de la Pena 3d8db21288
[CI] Upload the policheck result to be able to later decide what to exclude. (#18463)
This allows to later get the result and generate the exception list
based on it.
2023-06-19 15:38:52 -04:00
Rolf Bjarne Kvinge aab0ed1362
[AVFoundation] Fix a few issues with the AVAssetImageGenerator bindings. Partial fix for #18452. (#18460)
* The 'copyCGImageAtTime:actualTime:error:' selector is deprecated, so
replicate that.
* Bind the 'generateCGImageAsynchronouslyForTime:completionHandler:'
selector.

Fixes parts 1 and 2 of https://github.com/xamarin/xamarin-macios/issues/18452.
2023-06-19 19:16:29 +02:00
Mike Bond ed78eaf55e
Migrate to backport-action (#18462) 2023-06-19 09:33:18 -07:00
Rolf Bjarne Kvinge cb34bfe86c
[bgen] Make the generated code check for zero handle before creating an INativeObject wrapper instance. Fixes part of #18452. (#18461)
Also don't create the instance directly from third-party bindings, the
required constructor might not be public - use Runtime.GetINativeObject
instead.

Fixes part 4 of https://github.com/xamarin/xamarin-macios/issues/18452.
2023-06-19 11:16:34 +02:00
Rolf Bjarne Kvinge 959bb55d86
[tests] Fix formatting issues. (#18453) 2023-06-16 13:58:49 +02:00
Rolf Bjarne Kvinge 4c51cfa8bb
[msbuild] Copy the zip file back to Windows from the Zip task for remote builds. Fixes #18402. (#18447)
The zip file might be used later directly on Windows (for instance it
might be embedded inside a binding assembly as an embedded resource), so make
sure to copy it back to Windows.

Fixes https://github.com/xamarin/xamarin-macios/issues/18402 part 2.
2023-06-15 16:32:34 +02:00
Rolf Bjarne Kvinge 2761123a6b
[dotnet] Add a property to opt-out of the _CopyLocalBindingResources logic easily. (#18443)
It seems this target has more problems than at first I thought, so make
it easier to opt-out of it by just setting a property in the csproj.

More investigation is needed, but I'm keeping the target on by default
for now, since it solves a real-world problem as well.

Ref: https://github.com/xamarin/xamarin-macios/issues/18445
2023-06-15 09:54:22 +02:00
Rolf Bjarne Kvinge 7df3eb1520
[dotnet] Add targets to compute mlaunch arguments for installing and launching mobile apps. Fixes #18359. (#18446)
Add public targets to compute the mlaunch command lines for installing
and launching mobile apps.

These new targets are:

* ComputeMlaunchInstallArguments
* ComputeMlaunchRunArguments

As part of this change, also create a few new public properties:

* MlaunchPath
* MlaunchRunArguments
* MlaunchInstallArguments
* MlaunchRunScript
* MlaunchInstallScript

If the *Script variables are set, the corresponding target will create a
script file with the path to mlaunch + the corresponding arguments.

Otherwise, it's also possible to get the arguments directly from the
build log.

Fixes https://github.com/xamarin/xamarin-macios/issues/18359.
2023-06-15 07:21:09 +02:00
Rolf Bjarne Kvinge 859a48a73a
[tools] Automatically re-create ProductConstants.cs when the current commit changes. (#18426)
This fixes a frequent issue where building locally again would create
test apps where the registrar would fail due to mismatched runtime versions.
2023-06-12 18:44:25 +02:00
Rolf Bjarne Kvinge ba5becc790
[configure] Make it possible to run configure from any directory. (#18427) 2023-06-12 18:44:11 +02:00
Ivan Povazan e3088879a6
Reduce the size of `__LINKEDIT Export Info` section in stripped binaries (#18408)
# Description

This PR reduces the application's SOD (size on disk) by making
`__LINKEDIT Export Info` section smaller in the stripped Mach-O
binaries.

The feature is controlled by `_ExportSymbolsExplicitly` MSBuild property
and can be disabled by specifying: `-p:_ExportSymbolsExplicitly=true`

Fixes #18332 

# Initial problem

It has been noticed that during stripping, the strip tool does not
resize the export info section after it removes the symbols. Instead it
only zeroes out the entries (achieved by calling `prune_trie` function):

- https://github.com/apple-oss-distributions/cctools/blob/cctools-986/misc/strip.c
- https://github.com/apple-oss-distributions/ld64/blob/ld64-711/src/other/PruneTrie.cpp

Thanks @lambdageek for helping to track this down.

# Approach

As Xamarin build process already collects all the [required symbols][1] needed
for the application to run and preserves them during the strip phase, we can
use the same file to instruct clang toolchain to export only those symbols via
the command line options: `-exported_symbols_list <file>` ([source][2]).

This will make the export info section only include what is necessary for the
runtime - and at the same time eliminate the problem of the `strip` tool which
does not resize stripped symbols.

# Investigation setup

The issue is observable by building and inspecting the test application:
https://github.com/xamarin/xamarin-macios/blob/main/tests/dotnet/MySingleView/MySingleView.csproj
and targeting iOS platform in Release mode.

## Results:

| Measure      | MySingleView - main | MySingleView - this PR | Diff (%) | 
| :---         |                ---: |                   ---: |     ---: |
| SOD (bytes)  |            13668940 |               13458476 |    -1.5% |
| .ipa (bytes) |             4829368 |                4827928 |   -0.03% |

Even though zeroes are compressed well, the SOD is still affected and
unused section takes around 1.5% of the most simplistic app size.
Much bigger impact has been noted when trying out a MAUI iOS template
app with NativeAOT where the `__LINKEDIT Export Info` zeroes take up to
20MB of the SOD, but also with the regular macOS applications:
https://github.com/dotnet/runtime/issues/86707

### Repro current state of MySingleView.app with stripped binary

1. Build the app (you can ignore the need to run the sample, I just did it to
   make sure the changes do not break anything)

```bash
make run-device
``` 

2. Print the load commands - [load_cmds_strip.list][3]

```bash
otool -l bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > load_cmds_strip.list
```

- We are interested in the export info section:

```
cmd LC_DYLD_INFO_ONLY
...
export_off 5942960
export_size 207712
```

3. Create a hex dump of the export info section - [hex_dump_strip.list][4]

``` bash
xxd -s 5942960 -l 207712 bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > hex_dump_strip.list
```

- NOTE: Notice around ~200kb of zeroes from ~0x005ab490 to ~0x005dda00
    
4. Verify exported symbols are correct - [dyld_info_strip.list][5]

``` bash
dyld_info -exports bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > dyld_info_strip.list
```

### Repro current state of MySingleView.app with unstripped binary

1. Build the app (the make target preserves the symbols)

```bash
make run-device-no-strip
``` 

2. Print the load commands - [load_cmds_nostrip.list][6]

```bash
otool -l bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > load_cmds_nostrip.list
```

- We are interested in the export info section:

```
cmd LC_DYLD_INFO_ONLY
...
export_off 5942960
export_size 207712
```

3. Create a hex dump of the export info section - [hex_dump_nostrip.list][7]

``` bash
xxd -s 5942960 -l 207712 bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > hex_dump_nostrip.list
```

- Notice that the range: ~ 0x005ab490 to ~ 0x005dda00 now includes exported symbol entries
    
4. Verify exported symbols are correct - [dyld_info_nostrip.list][8]

``` bash
dyld_info -exports bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > dyld_info_nostrip.list
```

### Repro the new approach 

1. Build the app (the make target uses the new approach)

```bash
make run-device-export-syms
``` 

2. Print the load commands - [load_cmds_export.list][9]

```bash
otool -l bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > load_cmds_export.list
```

- We are interested in the export info section ***notice the reduced size of the section***:

```
cmd LC_DYLD_INFO_ONLY
...
export_off 5942432
export_size 1048
```

3. Create a hex dump of the export info section - [hex_dump_export.list][10]

``` bash
xxd -s 5942432 -l 1048 bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > hex_dump_export.list
```
    
4. Verify exported symbols are correct - [dyld_info_export.list][11]

``` bash
dyld_info -exports bin/Release/net7.0-ios/ios-arm64/MySingleView.app/MySingleView > dyld_info_export.list
```

---

## Additional benefits

With this approach we could also switch the way strip tool is invoked to
always strip all debug and local symbols via `strip -S -x` instead of passing
the file with symbols to preserve. This would remove the warning that we are
currently getting (which is being ignored):

```
/Applications/Xcode_14.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: warning: removing global symbols from a final linked no longer supported.  Use -exported_symbols_list at link time when building...
```

## Other references:

- https://github.com/qyang-nj/llios/blob/main/exported_symbol/README.md

[1]: 11e7883da0/tools/dotnet-linker/Steps/GenerateReferencesStep.cs (L38-L44)
[2]: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
[3]: https://gist.github.com/ivanpovazan/d53f8d10be5e4ea9f39a41ea540aa7fa
[4]: https://gist.github.com/ivanpovazan/60637422f3ff8cb5f437ddd06a21d9c1
[5]: https://gist.github.com/ivanpovazan/352595ad15c2ac02f38dcb3bd4130642
[6]: https://gist.github.com/ivanpovazan/bf700161f2f3691d1d7381c98d4fa0be
[7]: https://gist.github.com/ivanpovazan/44269e4fff5ebd58a4d181451e5c106f
[8]: https://gist.github.com/ivanpovazan/38c5afe076502d514a77420af0e10b01
[9]: https://gist.github.com/ivanpovazan/3f663c3c630005f5a578605d48ba807e
[10]: https://gist.github.com/ivanpovazan/0bb84f64281d05ab20438aeaed64f13c
[11]: https://gist.github.com/ivanpovazan/78b3ba2288f53a2316b9bc46964e7e4f

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-06-12 13:45:38 +02:00
Rolf Bjarne Kvinge 707a2db3e1
[msbuild] Make sure to copy the manifest from a binding resource package back to Windows. Fixes #18402. (#18419)
This fixes a build problem on windows when a project has a project reference
to a binding project. The binding resource package from the binding project
would lack the manifest, and thus the main project wouldn't detect it as a
binding resource package, effectively not seeing any native resource from the
binding project.

Fixes https://github.com/xamarin/xamarin-macios/issues/18402.
2023-06-08 16:51:29 +02:00
Rolf Bjarne Kvinge 50c5ae57f2
[msbuild] Dispose a few streams when done with them in the unzip/decompress logic. (#18410)
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1829715.
2023-06-08 16:51:10 +02:00
James Parsons 3feddf30eb
Update Messaging and System.Diagnostics.Tracer versions (#18416)
We need to update the `System.Diagnostics.Tracer` package to version
`2.1.0-alpha` due to an issue with the `ChecksumAlgorithm` property of
older versions.

Cherry-pick: https://github.com/xamarin/xamarin-macios/pull/18310
2023-06-07 12:55:27 +02:00
VS MobileTools Engineering Service 2 1527450920
[dotnet] Set _RequiresILLinkPack=true so that we always restore the ILLink package. (#18412)
This property will be required when building for a net7.0-* target framework
using .NET 8 (preview 6 - preview 5 does not need this fix)

Backport of #18411
2023-06-07 08:48:42 +02:00
Rolf Bjarne Kvinge 9e2143032f
Use Enum.GetValues<T> instead of Enum.GetValues in numerous places for .NET. (#18382)
NativeAOT warns about Enum.GetValues and suggests using Enum.GetValues<T>
instead, so do just that.
2023-06-07 08:47:55 +02:00
Haritha Mohan 4bbd7df8f5
[dotnet] Enable runtime identifiers to be overriden at build time (#18396)
Fixes #17707
The error target for when there is a conflict of interest in defining
both the runtime identifier and runtime identifiers is called during the
multi-rid builds, but not sure if the placement is the most ideal..

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-06-06 13:49:29 -07:00
Rolf Bjarne Kvinge b59587a0cd
[tests] Rework TestRuntime.RunAsync. (#18391)
* Move all the RunAsync logic to the TestRuntime class, instead of having some
  in TestRuntime and some in AppDelegate.
* Create a unified Task-based implementation for all platforms, optionally showing
  a UI on the platforms where we can do that.
* Remove all the overloads that took a DateTime timeout, and instead only use a
  TimeSpan timeout. This simplified some of the code.
* The new Task-based implementation will capture any exceptions (and rethrow most
  of them) from the tasks we're waiting for, so no need to do that in each RunAsync
  caller. This simplifies the testing code a lot for some tests.
* Add a new TryRunAsync method that will return (instead of rethrowing) any exceptions.
  This simplifies some of the testing code (which verifies the correct exception,
  or ignores the test in case of some exceptions).
* The new Task-based implementation will bubble up any NUnit exceptions, which
  means that the tasks we're waiting for can call NUnit's Assert and the right thing
  happens (in particular Assert.Ignore will actually ignore the test).
2023-06-06 21:36:49 +02:00
Rolf Bjarne Kvinge 1ca3c6ad8a
[tests] Adjust a few tests to not write a temporary file into the user directory. (#18394)
Fixes:

    MonoTouchFixtures.Foundation.NSFileManagerTest
    	[FAIL] GetSkipBackupAttribute : System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/F9F5B72D-D452-49F9-93AC-5CBB1E60A81C/DoNotBackupMe-NSFileManager-14036' is denied.
      ----> System.IO.IOException : Operation not permitted
    		   at Interop.ThrowExceptionForIoErrno(ErrorInfo , String , Boolean )
    		   at Interop.CheckIo(Error , String , Boolean )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , OpenFlags , Int32 , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , UnixFileMode , Int64& , UnixFileMode& , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 , Func`4 )
    		   at System.IO.File.OpenHandle(String , FileMode , FileAccess , FileShare , FileOptions , Int64 )
    		   at System.IO.File.WriteToFile(String , FileMode , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String )
    		   at MonoTouchFixtures.Foundation.NSFileManagerTest.GetSkipBackupAttribute() in xamarin-macios/tests/monotouch-test/Foundation/FileManagerTest.cs:line 98
    		   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
    		--IOException
    MonoTouchFixtures.Foundation.UrlTest
    	[FAIL] IsExcludedFromBackupKey : System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/F9F5B72D-D452-49F9-93AC-5CBB1E60A81C/DoNotBackupMe-NSUrl-14036' is denied.
      ----> System.IO.IOException : Operation not permitted
    		   at Interop.ThrowExceptionForIoErrno(ErrorInfo , String , Boolean )
    		   at Interop.CheckIo(Error , String , Boolean )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , OpenFlags , Int32 , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , UnixFileMode , Int64& , UnixFileMode& , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 , Func`4 )
    		   at System.IO.File.OpenHandle(String , FileMode , FileAccess , FileShare , FileOptions , Int64 )
    		   at System.IO.File.WriteToFile(String , FileMode , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String )
    		   at MonoTouchFixtures.Foundation.UrlTest.IsExcludedFromBackupKey() in xamarin-macios/tests/monotouch-test/Foundation/UrlTest.cs:line 54
    		   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
    		--IOException
2023-06-06 18:28:23 +02:00
dependabot[bot] df5b616c3f
Bump rolfbjarne/autoformat from 0.2.2 to 0.2.99 (#18407)
Bumps rolfbjarne/autoformat from 0.2.2 to 0.2.99.

## Commits

* Add support for a custom .NET executable and a custom working directory.
* Add branding.
* Change name so that it can be published to the marketplace.
* Quote script. Fixes issue 8.

See full diff: https://github.com/rolfbjarne/autoformat/compare/v0.2.2...v0.2.99
2023-06-06 15:12:44 +02:00
Rolf Bjarne Kvinge b03a9b3b87
[tools] Bump Xcode version in SdkVersions.cs. (#18406) 2023-06-06 14:49:41 +02:00
Rolf Bjarne Kvinge 11e7883da0
[tests] System.Numerics.Vector3.Length is a method, not a property, so treat it as such. (#18401)
Fixes:

    MonoTouchFixtures.Phase.PhaseObjectTest
    	[FAIL] ForwardTest :   length
			Expected: 1
			But was:  <System.Func`1[System.Single]>
    	[FAIL] RigthTest :   length
			Expected: 1
			But was:  <System.Func`1[System.Single]>
    	[FAIL] UpTest :   length
			Expected: 1
			But was:  <System.Func`1[System.Single]>
2023-06-05 15:46:33 +02:00
Rolf Bjarne Kvinge 12c300fb22
[ObjCRuntime] Avoid using Assembly.Location, it doesn't work with NativeAOT. (#18372) 2023-06-05 14:06:56 +02:00
Rolf Bjarne Kvinge 8d3a1aff7e
[tests] Fix warnings in tests/bgen/bgen-tests.csproj and enforce no more nullability warnings. (#18400) 2023-06-05 10:42:33 +02:00
Rolf Bjarne Kvinge 481ce215c9
[tests] Update the Xcode version check for Xcode 13.3. (#18390)
Fixes:

    MonoTouchFixtures.AVFoundation.CaptureMetadataOutputTest
    	[PASS] Defaults
    	[PASS] Flags
    	[FAIL] MetadataObjectTypesTest : System.NotImplementedException : The method or operation is not implemented.
    		   at TestRuntime.CheckXcodeVersion(Int32 major, Int32 minor, Int32 build) in xamarin-macios/tests/common/TestRuntime.cs:line 483
    		   at MonoTouchFixtures.AVFoundation.CaptureMetadataOutputTest.MetadataObjectTypesTest() in xamarin-macios/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs:line 131
    		   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
2023-06-05 10:27:32 +02:00
Alex Soto cc35efe4bc
[Xcode] Bump Xcode to version 14.3.1 (#18290)
Bump to stable Xcode 14.3.1
2023-06-02 10:39:14 -04:00
Rolf Bjarne Kvinge d33a5d812d
[tests] Use the NetworkResources class for urls instead of hardcoding them. (#18374) 2023-06-02 15:27:41 +02:00
Rolf Bjarne Kvinge a43b664584
[Foundation] Several fixes to NSFileManager. (#18371)
* Enable nullability.
* Add API that was previously iOS-specific to all platforms.
2023-06-02 15:19:42 +02:00
Rolf Bjarne Kvinge 7198886910
[tests] Give the CGImagePropertiesGPSTest some latitude with the coordinates. (#18375)
Seems like the actual values on device might be ever so slightly off.
2023-06-02 14:35:51 +02:00
Rolf Bjarne Kvinge 9e14229176
[tests] Adjust BundleTest to not use Assembly.Location, since it doesn't work in NativeAOT. (#18376) 2023-06-02 14:35:01 +02:00
Rolf Bjarne Kvinge fad26bcc3e
[tests] Adjust BundleTest to cope with a differently named app. (#18392)
It seems the actual app name might be "PublicStaging.app" on device now.

Fixes:

    MonoTouchFixtures.CoreFoundation.BundleTest
        [FAIL] TestExecutableUrl :
            Expected: String containing "monotouchtest.app/monotouchtest"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/monotouchtest"
        [FAIL] TestResourcesDirectoryUrl :
            Expected: String containing "monotouchtest.app/"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/"
        [FAIL] TestSupportFilesDirectoryUrl :
            Expected: String containing "monotouchtest.app/"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/"
         [FAIL] TestUrl :
            Expected: String containing "monotouchtest.app/"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/"
2023-06-02 14:32:05 +02:00
Rolf Bjarne Kvinge d98be15ea7
[tests] Fix typo in method name. (#18393) 2023-06-02 14:31:41 +02:00
Rolf Bjarne Kvinge 53e62dc1a0
[devops] Upgrade the PoliCheck and PostAnalysis tasks to v2. (#18381)
Fixes these warnings in Azure DevOps:

	* Please upgrade the version of this build task in your build to major version: 2. For more information, please see: https://aka.ms/gdn-v1-deprecation
	Governance Checks • Governance Checks • PoliCheck

	* Please upgrade the version of this build task in your build to major version: 2. For more information, please see: https://aka.ms/gdn-v1-deprecation
	Governance Checks • Governance Checks • Post Analysis

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-06-02 09:20:33 +02:00
Steve Hawley 91daf664c4
[dotnet] Add to optimizations (#18387)
add redirect-class-handles to test output along with options

---------

Co-authored-by: Alex Soto <alex@soto.dev>
2023-06-01 22:04:33 -04:00
Rolf Bjarne Kvinge b4f7daac08
[tests] Ignore the NWParametersTest.SetPrivacyContextText, it crashes everywhere. (#18383) 2023-06-01 12:03:56 +02:00
Rolf Bjarne Kvinge 722bc0c555
[devops] Collect test results and upload them for the Windows tests. (#18386)
Also make the tests log to stdout so that we can see what happened (i.e. went
wrong) from the logs.
2023-06-01 10:39:38 +02:00
Manuel de la Pena d2b6a5afb6
[CI] Move the script to run the tests to a file rather than being inline. (#18379) 2023-05-31 10:28:01 -04:00
dustin-wojciechowski 2606b2341e
[docs]Created a doc for preparing an app for TestFlight (#18125)
I created a short doc to help anyone uploading their app to Test Flight.

I targeted MacCatalyst apps for the Mac App Store but would work the
same for iOS apps.
2023-05-30 17:46:10 -04:00
Steve Hawley 62634bdc7a
[dotnet] add redirect-class-handles to optimizations. (#18354)
Add redirect-class-handles to optimization options.
2023-05-30 14:45:25 -04:00
Rolf Bjarne Kvinge 3e13f66948
[dotnet] Add support for asking more of 'open' when launching desktop apps. (#18366)
* Add support for forwarding our debugging msbuild properties to their
  corresponding environment variables (the XamarinDebug* properties).
* Add support for passing --stdout/--stderr/--stdin to open to redirect
  to/from a file. This is particularly useful for debugging debugging.
* Add support for passing -a (to always create a new instance of the app).
  This is useful when debugging (when the developer would always want a new
  instance, instead of opening an existing instance).
* Also add support for any other argument using the 'OpenArguments' property.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1825427.
2023-05-30 17:55:31 +02:00
Manuel de la Pena c5ef1a0a43
[CI] Use the template to generate a matrix strategy which reduces the yaml explosion. (#18312)
The final result is the same, but because a matrix strategy is a native
element of azure pipeline, it does not get expanded. This makes our
pipeline to be reduce to under 10.000 lines of yaml when it was around
40.000. This should unblock the dev of
https://github.com/xamarin/xamarin-macios/pull/18279
2023-05-30 10:26:53 -04:00
Rolf Bjarne Kvinge 12be89c189
[CoreFoundation] Add a few missing APIs to CFRunLoop and enable nullability. (#18322) 2023-05-30 08:50:42 +02:00
TJ Lambert 67ee512660
[Localization] Change PAT for automated PRs (#18345)
Let's try using this new PAT from VSEng in our automation to bring
translations from the Localization branch in PRs.

Tested here on a test branch:
https://github.com/xamarin/xamarin-macios/pull/18326

Co-authored-by: tj-devel709 <tjlambert@microsoft.com>
2023-05-26 11:47:04 -05:00
Mauro Agnoletti 495ebc9ffd
[main] Hot Restart fixes (#18317)
- Update Hot Restart client to 1.0.119: bring latest isignsharp fix 71220d490a

- Added missing app markers back:
    - Added .stamp files to make incremental deployments work again and to avoid re-installing the application. We use .stamp files to know which files to copy on incremental deployments and also to avoid unnecessary app installations
    - Added .hotrestartapp file back to identify the main app entry point. We need this since the main entry point to dynamically load the app might change between Forms and MAUI (could be a .dll or an .exe), so we need a way to let the Hot Restart app to know which is the main assembly to load
    
- Fixed outputs in _CodesignHotRestartAppBundle target: the codesign was being executed always, causing the incremental builds to not work as expected.

- Ensure the _CodesignHotRestartAppBundle target is executed before the copy of the content files and not after: Hot Restart content files doesn't affect the code signing, so they don't need to be copied before the signing process. Copying the content files before the code sign was causing unwanted behaviors and errors since the code sign logic will try to clear the signing folder before the execution, to avoid mixing old and new content
2023-05-26 16:24:30 +02:00
Rolf Bjarne Kvinge eb9ab07404
[msbuild] Add a missing 'UsingTask' for the FindILLink task. (#18334) 2023-05-25 18:32:25 +02:00
Rolf Bjarne Kvinge 95f6c356d0
[msbuild] Make the GetFileSystemEntries task capable of copying files to the Mac. (#18324)
Make the GetFileSystemEntries task capable of copying files to the Mac, and
enable this new behavior when inspecting references for binding resources.

Otherwise the task might not find anything, if the files aren't copied to the
Mac (this happens if the files originate from NuGets instead of referenced
projects).

Ref:

* https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1808448 (third attempt)
* https://github.com/xamarin/xamarin-macios/issues/18308
* https://github.com/dotnet/maui/issues/15042
2023-05-25 16:34:04 +02:00