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

11958 Коммитов

Автор SHA1 Сообщение Дата
TJ Lambert e59480829c
[AddressBook] Add Support for DotNet Attributes (#12564)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2021-08-30 11:41:35 -04:00
Manuel de la Pena 11838db7dd
[iAD] Fix message. fixes #12569 (#12574)
Add the missing '.'.

fixes https://github.com/xamarin/xamarin-macios/issues/12569
2021-08-27 16:19:20 -04:00
TJ Lambert dc4db0c2ae
[GameController] Add Support for DotNet Attributes (#12554)
Co-authored-by: tj_devel709 <antlambe@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-27 12:18:49 -04:00
TJ Lambert 03c9c7c379
[MediaPlayer] Add Support for DotNet Attributes (#12538)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-27 12:18:04 -04:00
Manuel de la Pena 8eab757b39
[CoreFoundation] Add support for xcode 13 beta 5. (#12552) 2021-08-27 10:59:08 -04:00
dotnet-maestro[bot] 74b161ae74
[main] Update dependencies from dotnet/installer (#12540)
* Update dependencies from https://github.com/dotnet/installer build 20210824.34

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.2.21423.21 -> To Version 6.0.100-rc.2.21424.34

* Update dependencies from https://github.com/dotnet/installer build 20210825.12

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.2.21423.21 -> To Version 6.0.100-rc.2.21425.12

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-27 12:44:14 +02:00
Peter Collins 91c6517f28
[ci] Opt in to symbol archiving during VS insertion (#12547)
Context: https://github.com/xamarin/yaml-templates/pull/131

Enables conversion and archiving of symbol files during the VS insertion
stage.  Symbol archiving steps will only run if both the
`symbolArtifactName` parameter is provided, and `archiveSymbols` is set
to true.  The `symbolConversionFilters` parameter can be used to filter
out paths of symbol files that should not be converted/archived.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-27 12:32:46 +02:00
James Parsons 8ff26838ec
Import .NET 6 property page targets path in iOS sdk targets (#12556)
* Import .NET 6 property page targets path in iOS sdk targets

* Fixes MSBuildExtensionsPath casing on Microsoft.iOS.Windows.Sdk.targets

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Emanuel Fernandez Dell'Oca <ema@xamarin.com>
2021-08-27 12:17:06 +02:00
Rolf Bjarne Kvinge c039e882cb
[xharness] Skip timestamps when processing logs. (#12539)
This fixes an issue where the html report wouldn't show test failures from
timestamped logs (which is the case for macOS test logs).

Also remove a duplicated condition.
2021-08-27 12:02:48 +02:00
Rolf Bjarne Kvinge cadfbc38d0
[msbuild/dotnet] Rework how app manifests are created. (#12516)
How we create the app manifest (Info.plist) has to be modified so that we can
add support for getting all the values from MSBuild properties (i.e. no
Info.plist in the project), as well as having multiple partial app manifests
that all get merged into the final app manifest.

Here's the new process:

1. The user can specify values in multiple ways:

   * An Info.plist in their project file (as always, by using a `None` item
     with filename "Info.plist" or with a `Link` metadata with filename
     "Info.plist"). We find this Info.plist in the DetectAppManifest target.
   * A partial plist in their project (using the `PartialAppManifest` item
     group)
   * Some MSBuild properties can also add values.

   The general precedence is: MSBuild properties can be overridden by the
   Info.plist, which can be overridden by a partial plist.

2. In the `CompileAppManifest` target we get all the inputs from above, and
   compute a temporary app manifest, which is written to a temporary output
   file.

3. In the `ReadAppManifest` target, we read the temporary output file and
   outputs numerous MSBuild properties (most of them private)

4. We run other targets that may add more entries to the final app manifest
   (these tasks might depend on the values from `ReadAppManifest`). These
   entries are written to partial plists, and added to the
   _PostCompilePartialAppManifest item group.

   Currently the targets that can add more entries to the app manifest are
   _CompileImageAssets and  _CompileCoreMLModels.

5. In the new `WriteAppManifest` target, we read the temporary output file
   from `ReadAppManifest` + any `_PostCompilePartialAppManifest` files and
   merge them all together to get the final Info.plist.

This also required moving the computation of CFBundleIdentifier from the
DetectSigningIdentity task to the CompileAppManifest task, which also meant
reordering these two tasks, so that the DetectSigningIdentity task is executed
after the CompileAppManifest task (technically after the ReadAppManifest
task), because the DetectSigningIdentity task needs to know the bundle
identifier.
2021-08-27 12:00:19 +02:00
Rachel Kang abb7b3aef8
Move catalyst todo to ignore 2021-08-26 18:54:16 -04:00
Manuel de la Pena 53988e12ac
[AVKit] Add support for xcode 12 beta 5. (#12551)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-26 18:16:06 -04:00
Manuel de la Pena 143a2216a6
[ThreadNetwork] Add new framework Xcode 13 beta 5. (#12533)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-08-26 18:15:31 -04:00
Sebastien Pouliot 1394420fdc
[corefoundation] Use `CFArrayGetValues` inside `CFArray` (#12537)
This requires less native calls (one for all values) than the current
code (one per value inside the array).

However the performance enhancement is not dramatic as the largest cost
is not in that code path (and the extra allocation undermine it too).
Still it's

I tried a few other variations (e.g. loop over a stackalloc'ed buffer)
but they did not perform better and the code was more complex.

Note: the NSArray* code/tests are identical between both sets (and the
mean results are also closer)

Actual Implementation

|                        Method |          name |              value |              Mean |              Error |          StdDev |
|------------------------------ |-------------- |------------------- |------------------:|-------------------:|----------------:|
| CFArray_StringArrayFromHandle |         empty |                 () |        124.856 ns |         13.1140 ns |       0.7188 ns |
| NSArray_StringArrayFromHandle |         empty |                 () |      1,438.752 ns |        120.3745 ns |       6.5981 ns |
|       CFArray_ArrayFromHandle |         empty |                 () |        124.727 ns |         21.3443 ns |       1.1700 ns |
|       NSArray_ArrayFromHandle |         empty |                 () |      1,433.047 ns |        164.6988 ns |       9.0277 ns |
| CFArray_StringArrayFromHandle |           few |  (  (...).") [108] |      1,818.681 ns |        457.2275 ns |      25.0622 ns |
| NSArray_StringArrayFromHandle |           few |  (  (...).") [108] |      8,636.130 ns |      2,505.6452 ns |     137.3429 ns |
|       CFArray_ArrayFromHandle |           few |  (  (...).") [108] |      4,105.635 ns |      1,151.4048 ns |      63.1124 ns |
|       NSArray_ArrayFromHandle |           few |  (  (...).") [108] |      8,769.657 ns |      1,946.9970 ns |     106.7215 ns |
| CFArray_StringArrayFromHandle | large_mutable |  ((...)) [8419330] | 20,103,343.750 ns | 13,762,095.1905 ns | 754,346.8755 ns |
| NSArray_StringArrayFromHandle | large_mutable |  ((...)) [8419330] | 24,256,992.708 ns |  9,357,034.9200 ns | 512,890.6579 ns |
|       CFArray_ArrayFromHandle | large_mutable |  ((...)) [8419330] |  3,888,197.135 ns |    395,545.6860 ns |  21,681.1938 ns |
|       NSArray_ArrayFromHandle | large_mutable |  ((...)) [8419330] |  7,326,581.510 ns |    622,485.7999 ns |  34,120.5472 ns |
| CFArray_StringArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    194,289.884 ns |     27,658.0701 ns |   1,516.0322 ns |
| NSArray_StringArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    549,336.410 ns |     98,695.3827 ns |   5,409.8270 ns |
|       CFArray_ArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    222,837.679 ns |     38,823.2619 ns |   2,128.0340 ns |
|       NSArray_ArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    441,116.243 ns |     46,578.8698 ns |   2,553.1450 ns |
| CFArray_StringArrayFromHandle |          null |                  ? |          4.568 ns |          0.8750 ns |       0.0480 ns |
| NSArray_StringArrayFromHandle |          null |                  ? |          4.728 ns |          1.0713 ns |       0.0587 ns |
|       CFArray_ArrayFromHandle |          null |                  ? |          4.818 ns |          1.0416 ns |       0.0571 ns |
|       NSArray_ArrayFromHandle |          null |                  ? |          4.793 ns |          0.5478 ns |       0.0300 ns |
| CFArray_StringArrayFromHandle |           one |            (    1) |        682.173 ns |         83.0811 ns |       4.5540 ns |
| NSArray_StringArrayFromHandle |           one |            (    1) |      3,409.570 ns |      1,407.8715 ns |      77.1702 ns |
|       CFArray_ArrayFromHandle |           one |            (    1) |      1,008.268 ns |        340.9156 ns |      18.6867 ns |
|       NSArray_ArrayFromHandle |           one |            (    1) |      3,174.222 ns |        412.6530 ns |      22.6189 ns |
| CFArray_StringArrayFromHandle | small_mutable | (   (...)9e") [54] |        909.008 ns |        271.9224 ns |      14.9050 ns |
| NSArray_StringArrayFromHandle | small_mutable | (   (...)9e") [54] |      5,017.722 ns |         66.9051 ns |       3.6673 ns |
|       CFArray_ArrayFromHandle | small_mutable | (   (...)9e") [54] |      1,900.176 ns |        131.5765 ns |       7.2121 ns |
|       NSArray_ArrayFromHandle | small_mutable | (   (...)9e") [54] |      4,913.822 ns |      1,264.8949 ns |      69.3332 ns |

New Implementation

|                        Method |          name |              value |              Mean |             Error |          StdDev |
|------------------------------ |-------------- |------------------- |------------------:|------------------:|----------------:|
| CFArray_StringArrayFromHandle |         empty |                 () |        112.335 ns |         0.7103 ns |       0.0389 ns |
| NSArray_StringArrayFromHandle |         empty |                 () |      1,497.473 ns |     1,508.7464 ns |      82.6995 ns |
|       CFArray_ArrayFromHandle |         empty |                 () |        114.670 ns |         3.7721 ns |       0.2068 ns |
|       NSArray_ArrayFromHandle |         empty |                 () |      1,486.298 ns |       767.5367 ns |      42.0713 ns |
| CFArray_StringArrayFromHandle |           few |  (  (...).") [108] |      1,526.398 ns |       205.6683 ns |      11.2734 ns |
| NSArray_StringArrayFromHandle |           few |  (  (...).") [108] |      8,503.264 ns |       981.4524 ns |      53.7967 ns |
|       CFArray_ArrayFromHandle |           few |  (  (...).") [108] |      3,814.918 ns |     1,868.8035 ns |     102.4354 ns |
|       NSArray_ArrayFromHandle |           few |  (  (...).") [108] |      8,628.285 ns |     2,416.9366 ns |     132.4805 ns |
| CFArray_StringArrayFromHandle | large_mutable |  ((...)) [8419330] | 16,351,876.042 ns | 3,691,993.1957 ns | 202,370.6051 ns |
| NSArray_StringArrayFromHandle | large_mutable |  ((...)) [8419330] | 24,589,916.667 ns | 2,800,427.9107 ns | 153,500.9034 ns |
|       CFArray_ArrayFromHandle | large_mutable |  ((...)) [8419330] |  3,390,725.260 ns | 2,950,426.1305 ns | 161,722.8120 ns |
|       NSArray_ArrayFromHandle | large_mutable |  ((...)) [8419330] |  7,296,976.823 ns | 4,376,785.2488 ns | 239,906.3683 ns |
| CFArray_StringArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    167,120.182 ns |    14,246.9472 ns |     780.9232 ns |
| NSArray_StringArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    554,940.788 ns |   116,685.5145 ns |   6,395.9268 ns |
|       CFArray_ArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    192,447.498 ns |    15,447.8562 ns |     846.7491 ns |
|       NSArray_ArrayFromHandle |   lot_mutable |  ( (...)") [34427] |    431,045.597 ns |    42,844.2650 ns |   2,348.4387 ns |
| CFArray_StringArrayFromHandle |          null |                  ? |          5.157 ns |         4.3360 ns |       0.2377 ns |
| NSArray_StringArrayFromHandle |          null |                  ? |          5.040 ns |         0.0694 ns |       0.0038 ns |
|       CFArray_ArrayFromHandle |          null |                  ? |          5.514 ns |         0.3849 ns |       0.0211 ns |
|       NSArray_ArrayFromHandle |          null |                  ? |          5.373 ns |         0.8358 ns |       0.0458 ns |
| CFArray_StringArrayFromHandle |           one |            (    1) |        730.162 ns |        65.9006 ns |       3.6122 ns |
| NSArray_StringArrayFromHandle |           one |            (    1) |      3,421.896 ns |       315.0152 ns |      17.2670 ns |
|       CFArray_ArrayFromHandle |           one |            (    1) |      1,052.039 ns |       295.2081 ns |      16.1814 ns |
|       NSArray_ArrayFromHandle |           one |            (    1) |      3,150.829 ns |       375.5461 ns |      20.5849 ns |
| CFArray_StringArrayFromHandle | small_mutable | (   (...)9e") [54] |        845.227 ns |        41.1244 ns |       2.2542 ns |
| NSArray_StringArrayFromHandle | small_mutable | (   (...)9e") [54] |      5,062.850 ns |     1,601.6880 ns |      87.7939 ns |
|       CFArray_ArrayFromHandle | small_mutable | (   (...)9e") [54] |      1,824.390 ns |       261.6341 ns |      14.3410 ns |
|       NSArray_ArrayFromHandle | small_mutable | (   (...)9e") [54] |      4,871.647 ns |       165.4350 ns |       9.0680 ns |

Fix https://github.com/xamarin/xamarin-macios/issues/12375
2021-08-26 16:37:31 -04:00
Rachel Kang 5bab0dad01
Merge pull request #12460 from rachelkang/xcode13.0-vision-b1
[Vision] Update bindings for Xcode 13.0 beta 1
2021-08-26 16:05:56 -04:00
Peter Collins cf491b0f89
[ci] Fix nuget push job dependency (#12560)
Commit c272040 started pushing both nupkgs and msis to the dotnet6 feed,
however the job dependency was not updated.  Since the "Push NuGets" job
consumes packages created by the "Convert NuGet to MSI" job, it must
depend on it.
2021-08-26 11:57:36 -04:00
Rolf Bjarne Kvinge 93b2b7f2b7
Merge branch 'main' into dotnet-compileappmanifest 2021-08-26 17:29:19 +02:00
Rolf Bjarne Kvinge 58ae71bbd0
Bump maccore. (#12557)
* Bump maccore.

New commits in xamarin/maccore:

* xamarin/maccore@62e6757515 [provisioning-profiles] Show more output from fetching the latest provisioning profiles. (#2504)
* xamarin/maccore@d9dcac2172 [submissions] Add ported samples. (#2503)
* xamarin/maccore@9473912ea3 [submission] Use a different bundle identifier for FSharpMacCoolApp to not clash with another test app. (#2502)
* xamarin/maccore@f235bd6454 Update vseng-xamarin-mac-devices.p12 (#2499)
* xamarin/maccore@2fba9b0761 [submissions] Fix string interpolation. (#2501)
* xamarin/maccore@32acd3aa82 [certificates] Update la_dev_apple.p12, la_distr_apple.p12 and la_mac_installer_distr.p12. (#2500)

Diff: 8bb7dc6c38..62e6757515

* Bump again.

New commits in xamarin/maccore:

* xamarin/maccore@3e591cbcb1 [provisioning-profiles] Add intermediate cert to the keychain. (#2506)

Diff: 62e6757515..3e591cbcb1
2021-08-26 17:26:07 +02:00
TJ Lambert f0373ee4f7
[iAD] Updates for DotNet Attributes (#12495) 2021-08-25 12:46:54 -05:00
Chris Hamons 0da207a74d
Enable ENABLE_DOTNET by default in Make.config (#12534) 2021-08-25 11:50:49 -05:00
Rolf Bjarne Kvinge 4357a6a7af [msbuild] Make WriteAppManifestTaskBase.AppBundleManifest an output property to create it on Windows for a remote build. 2021-08-25 15:29:02 +02:00
Filip Navara e3c915b3cf
Remove duplicate mention of "SceneKit Assets" (#12543) 2021-08-25 14:49:19 +02:00
Peter Collins 4d2c4a7350
[ci] Only sign and push on release branches (#12531)
The `templates/release/vs-insertion-prep.yml` template which includes
package signing and feed publishing should only run against official
branches.  The condition has been updated to check the branch name for
`main` or `release/` before running.
2021-08-25 11:56:09 +02:00
Rolf Bjarne Kvinge fa4689b533
[main] Update dependencies from dotnet/installer (#12481)
## 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 6.0.100-preview.6.21416.1 to 6.0.100-preview.6.21419.1 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer

- **Subscription**: df3e6147-3e41-4928-6775-08d8f479343c
- **Build**: 20210823.21
- **Date Produced**: 8/24/2021 12:53 AM
- **Commit**: 5f5d8bb4a209810fb93c86ce6b0b3172bd909134
- **Branch**: refs/heads/release/6.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.100-rc.1.21417.3 to 6.0.100-rc.2.21423.21][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 6.0.100-preview.6.21416.1 to 6.0.100-preview.6.21419.1][2]

[1]: 8c86609...5f5d8bb
[2]: 5b2391c...5851f6d
2021-08-25 09:43:54 +02:00
Rolf Bjarne Kvinge 55146dc3db
[tests] Remove some ignores for issues that have been fixed. (#12527) 2021-08-25 09:23:30 +02:00
Rolf Bjarne Kvinge 23f0f2b235
[build] Set the default target platform version to the current beta versions. (#12525)
These are the versions we're going to target for .NET 6 (unless Apple manages to
release another Xcode before that).
2021-08-25 09:23:00 +02:00
Rolf Bjarne Kvinge c09cf23682
Bump maccore. (#12523)
New commits in xamarin/maccore:

* xamarin/maccore@8bb7dc6c38 [docfixer] Add error checking to fix #xamarin/maccore@2479. (#2498)

Diff: 93d0469437..8bb7dc6c38
2021-08-25 09:21:05 +02:00
Rachel Kang 18e088bf8b
Defuse BOM! 2021-08-24 18:16:44 -04:00
Rachel Kang 254d37275e
[LocalAuthenticationEmbeddedUI] Update bindings for Xcode 13.0 beta 2 and 3 2021-08-24 18:05:47 -04:00
TJ Lambert 3847fe018e
[OpenGL] Add Support for DotNet Attributes (#12494) 2021-08-24 11:14:37 -05:00
Sebastien Pouliot 207285a393
[objcruntime] Do not pre-compute the `Selector.Name` property (#12518)
it's not often required.

Delaying it's retrieval allows the linker to remove additional code (and
lower the memory for each selector) if the app's code never uses the
selector name.

```diff
@@ -2990,8 +2985,6 @@
 	{
 		private IntPtr handle;

-		private string name;
-
 		public IntPtr Handle => handle;

 		public Selector(IntPtr P_0)
@@ -3001,13 +2994,11 @@
 				ThrowHelper.ThrowArgumentException("sel", "Not a selector handle.");
 			}
 			handle = P_0;
-			name = GetName(P_0);
 		}

 		internal Selector(IntPtr P_0, bool P_1)
 		{
 			handle = P_0;
-			name = GetName(P_0);
 		}

 		public sealed override bool Equals(object? P_0)
@@ -3029,14 +3020,6 @@
 			return handle.GetHashCode();
 		}

-		internal static string GetName(IntPtr P_0)
-		{
-			return Marshal.PtrToStringAuto(sel_getName(P_0));
-		}
-
-		[DllImport("/usr/lib/libobjc.dylib")]
-		private static extern IntPtr sel_getName(IntPtr P_0);
-
 		[DllImport("/usr/lib/libobjc.dylib", EntryPoint = "sel_registerName")]
 		public static extern IntPtr GetHandle(string P_0);

```
2021-08-24 09:02:20 -04:00
Rolf Bjarne Kvinge 6fdec1259d [tests] Add tests for CompileAppManifest and ReadAppManifest. 2021-08-24 14:41:20 +02:00
dotnet-maestro[bot] e1fcfc5d96 Update dependencies from https://github.com/dotnet/installer build 20210823.21
Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-rc.1.21417.3 -> To Version 6.0.100-rc.2.21423.21

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21416.1 -> To Version 6.0.100-preview.6.21419.1 (parent: Microsoft.Dotnet.Sdk.Internal
2021-08-24 12:15:40 +00:00
Rolf Bjarne Kvinge 2d8ca6941d [msbuild] Fix computation of min OS version for Mac Catalyst.
We store the macOS version in the Info.plist, and use the iOS version for the MinimumOSVersion
MSBuild variable.

This means that in ReadAppManifest we must convert the min OS version from the Info.plist
from a macOS version to an iOS version (and not do it in CompileAppManifest).

Also add support for the iOS version in the Info.plist for Mac Catalyst, and automatically
convert it to the corresponding macOS version.
2021-08-24 14:13:04 +02:00
Emanuel Fernandez Dell'Oca fbbaa7fca3
Fixes Hot Restart build issues (#12500)
* [net6] Bumps Xamarin Hot Restart to 1.0.70

This version contains fixes for building Maui projects with Hot Restart

* [msbuild] Fixes Hot Restart Entitlements.plist compilation

The build was failing if `CodesignEntitlements` was not set, even though the CompileEntitlements task has a default value. That default value is not compatible with Hot Restart because it is a template file that exists on the Mac (and Hot Restart is an offline build from Windows).

So if that property is not set we get the xcent file from the Hot Restart PreBuilt app bundle, which is essentially an empty plist.

* [net6] Makes Hot Restart consider Single Project app title

On a Maui Single Project the app title can be set on the project file using the `ApplicationTitle` property. If that's set Hot Restart should include that value in the compiled app manifest, so the app name is shown on the device when the app is deployed.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-08-24 08:13:27 +02:00
Rolf Bjarne Kvinge 315da84591 [msbuild] Remove unused usings in new file and add missing space for code style. 2021-08-24 07:45:25 +02:00
Rolf Bjarne Kvinge bdce949335 [msbuild] Enable nullability on new files. 2021-08-24 07:45:02 +02:00
Rolf Bjarne Kvinge 197b564c21 Merge remote-tracking branch 'origin/main' into darc-main-971a17ce-2b67-4dbe-bb13-8308d33e5f58 2021-08-24 07:26:26 +02:00
Rolf Bjarne Kvinge 3e728faa77 [tests] Update tests that use HttpClientHandler to get matching behavior with legacy Xamarin. 2021-08-24 07:26:19 +02:00
Rolf Bjarne Kvinge fc631442f9 [src] Add additional HttpClientHandler properties to NSUrlSessionHandler.
HttpClientHandler will use reflection to call the underlying handler, for all
the properties it supports. This means that if those properties don't exist in
NSUrlSessionHandler, the developer will get unhelpful NullReferenceExceptions
instead of PlatformNotSupportedExceptions.

Example test failure:

    HttpClient: AutomaticDecompression
        Expected: <System.PlatformNotSupportedException>
        But was: <System.NullReferenceException: Object reference not set to an instance of an object
        at System.Net.Http.HttpClientHandler.InvokeNativeHandlerMethod(String , Object[] )
        at System.Net.Http.HttpClientHandler.GetAutomaticDecompression()
        at System.Net.Http.HttpClientHandler.get_AutomaticDecompression()
        at LinkSdk.Net.Http.HttpClientHandlerTest.<>c__DisplayClass0_0.<HttpClient>b__0() in /Users/rolf/work/maccore/6.0.1xx-rc.1/xamarin-macios/tests/linker/ios/link sdk/HttpClientHandlerTest.cs:line 31
        at NUnit.Framework.Assert.Throws(IResolveConstraint expression, TestDelegate code, String message, Object[] args)>

It also fixes numerous linker warnings such as:

    ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetAutomaticDecompression(): No members were resolved for 'get_AutomaticDecompression'.
    ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetCheckCertificateRevocationList(): No members were resolved for 'get_CheckCertificateRevocationList'.
    ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetClientCertificateOptions(): No members were resolved for 'get_ClientCertificateOptions'.
    ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetClientCertificates(): No members were resolved for 'get_ClientCertificates'.
    ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetDefaultProxyCredentials(): No members were resolved for 'get_DefaultProxyCredentials'.
    ILLink : warning IL2037: System.Net.Http.HttpClientHandler.GetMaxAutomaticRedirections(): No members were resolved for 'get_MaxAutomaticRedirections'.
    [...]
2021-08-24 07:26:13 +02:00
Mike Bond bbb21180e2
[CI] Build pipeline: Agent-Cleanser: yaml-template step (#12502) 2021-08-23 13:05:12 -07:00
Rachel Kang a7ed18a19a
Fix VNUtilsTests 2021-08-23 14:48:32 -04:00
Rachel Kang b879223cb0
Remove misplaced static 2021-08-23 14:48:01 -04:00
Přemek Vysoký 28fc7bb697
Bump maccore (#12497) 2021-08-23 14:40:45 -04:00
VS MobileTools Engineering Service 2 917462e32a
Localized file check-in by OneLocBuild Task (#12506) 2021-08-23 14:39:11 -04:00
Rolf Bjarne Kvinge f0b992c3c1 [msbuild] Only validate the Info.plist values if we're actually creating an app manifest. 2021-08-23 17:46:33 +02:00
Rolf Bjarne Kvinge b3dff34ea5 [msbuild] Rework how the app manifest is created.
How we create the app manifest (Info.plist) has to be modified so that we can add
support for getting all the values from MSBuild properties (i.e. no Info.plist in
the project), as well as having multiple partial app manifests as well, that gets
merged into the final app manifest.

Here's the new process:

1. The user can specify values in multiple ways:

    * An Info.plist in their project file (by using a `None` item with
      filename "Info.plist" or with a `Link` metadata with filename
      "Info.plist"). We figure this out in the DetectAppManifest target.
    * A partial plist in their project (using the `PartialAppManifest` item group)
    * Some MSBuild properties can also add values.

    The precedence is: MSBuild properties can be overridden by the Info.plist,
    which can be overridden by a partial plist.

2. In the `CompileAppManifest` target we get all the inputs from above, and compute
a temporary app manifest, which is written to a temporary output file.

3. In the `ReadAppManifest` target, we read the temporary output file and outputs
numerous MSBuild properties (most of then private)

4. We run other targets that may add more entries to the final app manifest (these
tasks might depend on the values from `ReadAppManifest`). These entries are written
to partial plists, and added to the _PostCompilePartialAppManifest item group.

   The targets in question are:

	* _CompileImageAssets * _CompileCoreMLModels

5. In the new `WriteAppManifest` target, we read the temporary output file from `ReadAppManifest`
+ any `_PartialAppManfiest` items and merge them all together to get the final Info.plist.

This also required moving the computation of CFBundleIdentifier from the DetectSigningIdentity
task to the CompileAppManifest task. This also meant reordering these two tasks,
so that the DetectSigningIdentity task is executed after the CompileAppManifest task
(technically after the ReadAppManifest task), because the DetectSigningIdentity task
needs to know the bundle identifier.

This way we can handle multiple scenarios easily (most of this is not covered by
these changes, and will be implemented separately):

* No Info.plist at all, all non-default values come from MSBuild properties.
* A single Info.plist, where everything is specified.
* An Info.plist with multiple partial app manifests as well.
2021-08-23 17:46:33 +02:00
Rolf Bjarne Kvinge fa8e792040 [dotnet/msbuild] Create *DependsOn properties for several targets. 2021-08-23 17:46:33 +02:00
Rolf Bjarne Kvinge ed90637a9b [msbuild] Make sure the '_SeparateWatchAppReferences' target is executed before the '_AssignWatchAppConfiguration' target.
The '_AssignWatchAppConfiguration' target's condition refers to an item group
that is created by '_SeparateWatchAppReferences', which means that we must
ensure that the '_SeparateWatchAppReferences' target is executed before the
'_AssignWatchAppConfiguration' target
2021-08-23 17:46:33 +02:00
Rachel Kang 82eb5013ad
Fix selector typo swap 2021-08-23 10:59:52 -04:00