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

15550 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena cc695a8196
[Generator] Clean the attribute work. (#17570)
Some changes:

1. Move all the static attr related methods to the attr factory.
2. Make it simpler to see the diff between NET and not by using a
partial class.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-03-23 16:54:08 -04:00
TJ Lambert 7cc9e12da4
[Localization] Remove Localization from Main Stage (#17849) 2023-03-23 12:29:11 -05:00
TJ Lambert 2814d76bbd
[Localization] New Pipeline to replace github action - not from fork (#17853) 2023-03-23 12:17:31 -05:00
Haritha Mohan 3dff232920
[dotnet] Enable generation of runtime configuration file (#17840)
Set the GenerateRuntimeConfigurationFiles (GRCF) property to true 
to avoid warnings at build time + add test for change.

Diving deeper into the fix...
- This warning only occurs with .NET apps which is why GRCF
is only updated in the dotnet directory and not msbuild (legacy)
- After examining the binlog (see issue), it was found that the GRCF 
was contingent upon the HasRuntimeOutput property, which is only 
defined for executable projects. And in this case, the user's project
output type is library thus both the RuntimeOutput and consequently 
GRCF properties were not enabled.
- By setting the GRCF to true we can address the original warning of 
concern while ensuring the rest of the projects's behavior is not
altered
in mysterious ways (i.e. by touching the RuntimeOutput property or the 
project output type instead, these changes could have extraneous
effects).

Fixes #17543

---------

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-23 08:10:04 -07:00
Rolf Bjarne Kvinge 32dd91129b
[system-dependencies] Check the correct PROVISION_X variable when provisioning simulators. (#17884) 2023-03-23 14:50:54 +01:00
Rolf Bjarne Kvinge 6e2ff59b30
[tests] Port Cecil tests to a .NET test project. (#17836) 2023-03-23 08:34:52 +01:00
Rolf Bjarne Kvinge c3292c32df
[msbuild] Merge the CollectITunesArtwork and CollectITunesArtworkTaskBase classes. (#17859)
We no longer need two have overridable logic for remote builds, so the
non-abstract task class and the abstract base class can be merged.
2023-03-23 08:34:40 +01:00
Rolf Bjarne Kvinge 7ef4153bd2
[msbuild] Always pass --wait-for-exit:<value> to mlaunch. (#17865)
Because depending on other options the default can be either 'true' or
'false', and this way we always ask mlaunch to do the right thing.

Also ensure any additional arguments are added last, so they can
override any other argument.
2023-03-23 08:34:13 +01:00
Peter Collins 432d27b171
[vs-workload] Update VS Component versions (#17883)
Context: https://github.com/xamarin/sdk-insertions/issues/56

Updates the VS component version for all workloads to use the NuGet
versions commit distance as the third version part.
2023-03-23 08:22:42 +01:00
Rolf Bjarne Kvinge 6161fbbb30
[devops] Collect crash reports for each test job. (#17880) 2023-03-22 22:00:41 +01:00
Rolf Bjarne Kvinge 07198f1224
[tests] Add Windows .NET test that exercises some of our test configuration code. (#17874) 2023-03-22 20:23:26 +01:00
Rolf Bjarne Kvinge 8ac36f126e
[dotnet] Add support for setting an MSBuild property to pass additional mlaunch arguments. (#17866)
This is helpful when doing a command-line -t:Run build, because it's not
possible to set an item group from the command line.
2023-03-22 16:19:49 +01:00
Rolf Bjarne Kvinge c049fd33c3
[src] Fix min OS versions for .NET for numerous APIs. (#17871)
We don't need to specify a min OS version for APIs that are available in
the first OS version we support, in which case we just state that we support
said API.

This was done with this script:
https://gist.github.com/rolfbjarne/5374efba6757c724442137e89fa65113
2023-03-22 15:07:29 +01:00
Rolf Bjarne Kvinge 999c5a3e97
[tests] Share code to verify failures. (#17872)
We have some code that verifies a list of failures against a known set of
failures and:

* Fails if any known failure is fixed.
* Fails if there any new (unknown) failures.

Create a helper method that contains this logic, since it's duplicated quite a
few times across various tests.
2023-03-22 11:47:54 +01:00
Rolf Bjarne Kvinge 7ea0044224
[dotnet/msbuild] Copy binding resource packages to output directories together with CopyLocal assemblies. Fixes #13910. (#17806)
With a project structure like this:

* Executable project references a library project.
* The library project references a binding project (or assembly).

The binding project's assembly will be copied to the library project's
output directory during the build. Unless we also make sure any binding
resource packages are copied as well, the executable project won't find those,
and the final app won't contain any native bits from the binding project.

The solution is to add any binding resource packages to the list of
files to be copied to the library's output directory.

Fixes https://github.com/xamarin/xamarin-macios/issues/13910.
2023-03-22 10:49:26 +01:00
Rolf Bjarne Kvinge e86c77a773
[devops] Run .NET tests with the 'Windows' category on Windows (#17796) 2023-03-22 07:49:03 +01:00
Rolf Bjarne Kvinge 02f5e2188c
[system-dependencies] Improve detection of existing simulator runtimes. (#17855)
Also fix a condition that would cause the script to provision simulator
runtimes as long as --provision-xcode was *not* passed to the script.
2023-03-22 07:48:10 +01:00
Rolf Bjarne Kvinge 663db17543
[generator] Simplify/clarify code a little bit. (#17858) 2023-03-22 07:42:29 +01:00
dotnet-maestro[bot] 8852f61dfe
[main] Update dependencies from dotnet/installer (to 7.0.2xx) (#17803)
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 7.0.3 to 7.0.4 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: fffd7604-ce46-455f-0f2f-08db24524baf
- **Build**: 20230320.23
- **Date Produced**: March 21, 2023 6:36:46 AM UTC
- **Commit**: 332c2bc24954c8305a1985bd8e52088cc6b6a677
- **Branch**: refs/heads/release/7.0.2xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.105-servicing.23165.29 to 7.0.203-servicing.23170.23][8]

[8]: f7fbfe4...332c2bc
2023-03-22 07:41:11 +01:00
Rolf Bjarne Kvinge 74c4fe7e25
[msbuild] Enable nullability and unify base and derived class for the GetFiles task. (#17814) 2023-03-21 18:22:12 +01:00
Rolf Bjarne Kvinge bfd87e4bb2
[msbuild] Verify Mac Catalyst apps like we verify macOS apps. Fixes #17829. (#17835)
* For Mac Catalyst apps we must verify the code signature like we do it for macOS apps. Fixes #17829.
* Enable nullability and fix code accordingly.
* Merge the CodesignVerify and CodesignVerifyTaskBase classes to simplify the code.

Submission test is added as well:

* https://github.com/xamarin/maccore/pull/2656
* https://github.com/xamarin/SubmissionSamples/pull/51

Fixes https://github.com/xamarin/xamarin-macios/issues/17829.
2023-03-21 18:20:05 +01:00
Rolf Bjarne Kvinge 6300a6aff7
[tests] Improve NWProtocolIPOptionsTest to not leak exceptions on background threads. (#17824) 2023-03-21 16:16:25 +01:00
dotnet-maestro[bot] 794281233c
[main] Update dependencies from dotnet/runtime (#17821)
This pull request updates the following dependencies

## From https://github.com/dotnet/runtime
- **Subscription**: 38d2313f-22d5-4062-c8e1-08dabd6d8c77
- **Build**: 20230315.8
- **Date Produced**: March 16, 2023 3:09:46 AM UTC
- **Commit**: 1e9466d9a2913f3a45893851f79b54da11ba3069
- **Branch**: refs/heads/release/7.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 7.0.5 to 7.0.5][5]

[5]: 1377e5e...1e9466d
2023-03-21 12:51:27 +01:00
dotnet-maestro[bot] 964eee254f
[main] Update dependencies from dotnet/installer (#17820)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230315.29
- **Date Produced**: March 16, 2023 12:31:23 AM UTC
- **Commit**: f7fbfe43cd951a8771c1e26c534a1308ffb25d29
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.105-servicing.23164.24 to 7.0.105-servicing.23165.29][5]

[5]: 5b75cc6...f7fbfe4
2023-03-21 09:46:12 +01:00
Rolf Bjarne Kvinge a1d915a8a6
[devops] Clean simulator runtimes from bots. (#17832)
If there are more than one simulator runtime for a given platform, then
remove all of them.

This will hopefully fix a few problems we're having with hard drive
space issues (we end up with a lot of identical simulator runtimes
downloaded).
2023-03-21 07:42:09 +01:00
Steve Hawley 63470f9b74
add EditorBrowsable to obsolete member (#17854) 2023-03-21 07:41:39 +01:00
Peter Collins 289ded90fe
[vs-workload] Remove @(MultiTargetPackNames) (#17838)
Context: https://github.com/xamarin/yaml-templates/pull/251

The VS manifest files generated during MSI conversion will now be split
up using the workload pack type rather than a substring match.
2023-03-20 15:36:44 -04:00
Rolf Bjarne Kvinge 97d1eac9cb
[src] Improve the generated project files a little bit. (#17812)
* Use the right TFM.
* Compute the right assembly name.
2023-03-17 11:48:05 +01:00
Rolf Bjarne Kvinge f37c86bd1e
[tools] Re-create dotnet-linker.csproj.inc when dotnet-linker.csproj changes. (#17826) 2023-03-17 07:58:12 +01:00
Rolf Bjarne Kvinge 38a2442839
[tests] Run the OutOverriddenWithoutOutAttribute test on all platforms on .NET (#17827) 2023-03-17 07:57:59 +01:00
Rolf Bjarne Kvinge 68cb21838b
Encode the .NET version we're targeting in the third NuGet version number. (#17818)
Encode the .NET version we're targeting in the third NuGet version number by
adding X000 (where X is the .NET version) to the commit distance.

This accomplishes a few goals:

* We automatically compute a different NuGet version depending on the .NET version we're targeting.
* Versions are sorted correctly (.NET 7 nugets have a higher version number than .NET 6 nugets).
* It's possible to see which .NET version a NuGet is targeting from the version.

The downside is:

* The scheme breaks down if we need more than three digits for the commit
  distance (possible solution: add another zero, so we add X0000 instead of
  X000).
2023-03-17 07:39:59 +01:00
Steve Hawley 61ad2a9dec
CGEventCreate fixed broken call, added tests (#17805)
Fixes https://github.com/xamarin/xamarin-macios/issues/17656
2023-03-16 11:00:12 -04:00
Rolf Bjarne Kvinge b941563bbc
[src] Define NETX_Y_OR_GREATER flags for our platform assemblies. (#17811)
This is automatically done by 'dotnet build', but we don't use 'dotnet build'
to build our platform assemblies, so we have to do it manually since we want
to use these defines in our code.
2023-03-16 15:02:08 +01:00
dotnet-maestro[bot] 0a9c4a1f23
[main] Update dependencies from dotnet/installer (#17800)
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 7.0.3 to 7.0.4 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230314.24
- **Date Produced**: March 14, 2023 9:50:09 PM UTC
- **Commit**: 5b75cc65bcba1921fd3a69ee83edbb648b65bfb3
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.105-servicing.23163.5 to 7.0.105-servicing.23164.24][1]
  - **Microsoft.AspNetCore.App.Ref**: [from 7.0.3 to 7.0.4][2]

[1]: 223e47f...5b75cc6
[2]: https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/branches?baseVersion=GCfebee99&targetVersion=GCe56abc4&_a=files
2023-03-15 19:10:33 +01:00
dotnet-maestro[bot] e6eabcdba5
[main] Update dependencies from dotnet/runtime (#17788)
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.Workload.Emscripten.net7.Manifest-7.0.100**: from 7.0.4 to 7.0.4 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/runtime
- **Subscription**: 38d2313f-22d5-4062-c8e1-08dabd6d8c77
- **Build**: 20230314.7
- **Date Produced**: March 15, 2023 2:10:03 AM UTC
- **Commit**: 1377e5e24afeb8aa919c3dc9772efcc68e28139c
- **Branch**: refs/heads/release/7.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 7.0.5 to 7.0.5][3]
  - **Microsoft.NET.Workload.Emscripten.net7.Manifest-7.0.100**: [from 7.0.4 to 7.0.4][4]

[3]: ca584ef...1377e5e
[4]: ba16583...3d7178d
2023-03-15 19:06:40 +01:00
Rolf Bjarne Kvinge c398f333fc
[monotouch-test] Be more accepting in the NSTextInputClient test. (#17795)
It seems we can get different results depending on OS versions, but I had no
success figuring out the conditions that make the results differ, so just
accept all variations we get.
2023-03-15 14:33:44 +01:00
Rolf Bjarne Kvinge 0faf60c2e9
[tests] Add new cecil tests to verify correct block literal usage in our own code. Fixes #15783. (#17794)
This is the final step in our improved block support.

Fixes https://github.com/xamarin/xamarin-macios/issues/15783.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-03-15 14:31:02 +01:00
Rolf Bjarne Kvinge c391695bb1
[AppKit] Add a weakly typed version of NSRulerView.WeakMeasurementUnits. Fixes #17742. (#17779)
There's not a finite list if measurement units, apps can create their own, so
we have to allow weakly typed measurement units (the normal property is bound
using a strong enum to NSRulerViewUnits).

Fixes https://github.com/xamarin/xamarin-macios/issues/17742.
2023-03-15 10:47:11 +01:00
Manuel de la Pena d26840e93b
[Actions] Do not double quote the commit msg. (#17793) 2023-03-14 14:30:48 -04:00
dotnet-maestro[bot] 08c89a918e
[main] Update dependencies from dotnet/installer (#17787)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230313.5
- **Date Produced**: March 13, 2023 10:03:30 PM UTC
- **Commit**: 223e47f52f440050a8141128a4bf2c55cab8c0b0
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.105-servicing.23157.18 to 7.0.105-servicing.23163.5][1]

[1]: 3a17ee2...223e47f
2023-03-14 18:58:26 +01:00
Rolf Bjarne Kvinge 29633a6231
[generator] Make the block callbacks UnmanagedCallersOnly functions in .NET. (#17741)
This also required updating a manual binding since it poked into
generated internals.

Contributes towards https://github.com/xamarin/xamarin-macios/issues/15783.
2023-03-14 10:08:28 +01:00
Alex Soto 91781715a9
[CI] [siminstaller] Bump bots to use the Ventura and make siminstaller more resilient (#17760)
## siminstaller

We are getting a `System.IO.IOException: Resource busy`
when trying to detach with hdiutil on Ventura. When reaching
this spot we are really done with the mounted resource so
let's force detaching and in the event that it fails let's
just log since at this point the simulator is installed.

## CI

Bump bots to use the Ventura images, and Add `macOSName`
parameter to our yaml templates.

`macOSName` maps to the `macOS.Name` capability in our bots, this
way we can set the macOS name we want to use on the bots in bot build and tests.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-14 07:27:00 +01:00
Manuel de la Pena 7f4eea4941
[Actions] Ensure that we escape illegal chars from the commit msg. (#17783) 2023-03-13 17:49:24 -04:00
dotnet-maestro[bot] 7979fa08fc
[main] Update dependencies from dotnet/runtime (#17746)
This pull request updates the following dependencies

## From https://github.com/dotnet/runtime
- **Subscription**: 38d2313f-22d5-4062-c8e1-08dabd6d8c77
- **Build**: 20230310.12
- **Date Produced**: March 11, 2023 6:36:38 AM UTC
- **Commit**: ca584ef0160c1806c91f2edf544de7070958ff55
- **Branch**: refs/heads/release/7.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 7.0.4 to 7.0.5][6]

[6]: b68fd88...ca584ef
2023-03-13 17:38:59 +01:00
Rolf Bjarne Kvinge 8b3a434000
[devops] Report the result of the Windows tests as a GitHub comment. (#17727) 2023-03-13 08:09:35 +01:00
dotnet-maestro[bot] e8dde3aa1e
[main] Update dependencies from dotnet/installer (#17744)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230307.18
- **Date Produced**: March 8, 2023 1:55:02 AM UTC
- **Commit**: 3a17ee2e6f2c7cd19c730e947c451593f1ed2488
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.104-servicing.23153.1 to 7.0.105-servicing.23157.18][5]

[5]: a4ecf7b...3a17ee2
2023-03-13 08:03:24 +01:00
Manuel de la Pena 0d4c797b7c
[CI] Download the minimum number of artefacts (#17762)
Because the template is know shared between pipelines, we need tone more
precise.
2023-03-10 11:43:54 -05:00
Steve Hawley 4c1e5681f1
[dotnet] future proof the test (#17739)
Add documentation in case of future test fails
2023-03-08 12:29:57 -05:00
Manuel de la Pena bf32e8551c
[CI] Allow to debug the env in the upload jobs. (#17724) 2023-03-08 11:47:48 -05:00
Rolf Bjarne Kvinge d6d02fa05a
[monotouch-test] Fix bool encoding in tests on ARM64 on Mac Catalyst. (#17695)
Fixes:

    [FAIL] TestTypeEncodings :   #14
        String lengths are both 1. Strings differ at index 0.
        Expected: "B"
        But was:  "c"
        -----------^
2023-03-08 10:43:52 +01:00