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

15140 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge c7a9981d18
Merge main into net8.0. (#17207) 2023-01-13 11:55:23 +01:00
Rolf Bjarne Kvinge fd83701620 Merge main into net8.0. 2023-01-12 17:10:27 +01:00
Manuel de la Pena 00219b952f
[CI] Move the upload to a hosted image. (#17192)
We have noticed that the azure upload steps fail when they are executed
in a on prem windows machine. The infra team does not know what this is
happening. To work around it we are taking the following stes:

- Move the upload to a hosted image, which does work.
- Donot download all artefacts, since hosted images only have a 10 gb
hdd. We download all but the not needed files using negative match
patterns.
2023-01-12 11:05:15 -05:00
Rolf Bjarne Kvinge a02410530a
[tests] NWPathMonitors must be cancelled. (#17178)
Otherwise the process may crash later on:

    apitest.KernelNotificationTest

    =================================================================
    	Native Crash Reporting
    =================================================================
    Got a term while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    =================================================================
    	Native stacktrace:
    =================================================================
    	0x1050093d6 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : mono_dump_native_crash_info
    	0x104ffcf3e - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : mono_handle_native_crash
    	0x1050106c6 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : mono_crashing_signal_handler
    	0x7ff818795dfd - /usr/lib/system/libsystem_platform.dylib : _sigtramp
    	0x0 - Unknown
    	0x7ff81c88c9f8 - /usr/lib/libnetwork.dylib : nw_path_shared_necp_fd
    	0x7ff81c99e796 - /usr/lib/libnetwork.dylib : -[NWConcrete_nw_path_evaluator dealloc]
    	0x7ff81c9bb93e - /usr/lib/libnetwork.dylib : __nw_dictionary_dispose_block_invoke
    	0x7ff8184bc5a3 - /usr/lib/system/libxpc.dylib : _xpc_dictionary_apply_apply
    	0x7ff8184b97e9 - /usr/lib/system/libxpc.dylib : _xpc_dictionary_apply_node_f
    	0x7ff8184bc4cd - /usr/lib/system/libxpc.dylib : xpc_dictionary_apply
    	0x7ff81c98c7eb - /usr/lib/libnetwork.dylib : -[OS_nw_dictionary dealloc]
    	0x7ff81cfa5ab5 - /usr/lib/libnetwork.dylib : nw_path_release_globals
    	0x7ff81c9edba6 - /usr/lib/libnetwork.dylib : nw_settings_child_has_forked
    	0x7ff818783103 - /usr/lib/system/libsystem_pthread.dylib : _pthread_atfork_child_handlers
    	0x7ff81867482d - /usr/lib/system/libsystem_c.dylib : fork
    	0x1051b37a3 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : process_create
    	0x1051b224a - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal
    	0x1050e4111 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal_raw
    	0x10d4f2437 - Unknown
    	0x10d4f1e4b - Unknown
    	0x10d4f188b - Unknown
    	0x10d4f17b3 - Unknown
    	0x10d4f1363 - Unknown
    	0x10d4f11bb - Unknown
    	0x10d4efc53 - Unknown
    	0x10d4ee121 - Unknown
    	0x105013d23 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : mono_jit_runtime_invoke
    	0x1051483f8 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : mono_runtime_invoke_checked
    	0x1051510cf - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : mono_runtime_try_invoke_array
    	0x1050d7127 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : ves_icall_InternalInvoke
    	0x1050e9b57 - /Users/rolf/work/maccore/msbuild/xamarin-macios/tests/xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests : ves_icall_InternalInvoke_raw

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-12 14:30:23 +01:00
dotnet-maestro[bot] 7531ec8b79
[main] Update dependencies from dotnet/runtime (#17173)
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.2 to 7.0.2 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/runtime
- **Subscription**: 38d2313f-22d5-4062-c8e1-08dabd6d8c77
- **Build**: 20230109.16
- **Date Produced**: January 10, 2023 8:35:10 AM UTC
- **Commit**: 2f7c3f4a4f4a49362055d45751756eb4224c7414
- **Branch**: refs/heads/release/7.0

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

[3]: a790868...2f7c3f4
[4]: d71ea7c...00fbd97

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2023-01-12 14:30:00 +01:00
Rolf Bjarne Kvinge 48f9d5c5ea
[msbuild] Add an SdkDevPath property to the DSymUtil task. (#17108)
Add an SdkDevPath property to the DSymUtil task, and use it to set DEVELOPER_DIR when calling dsymutil.

Should fix this:

> xcrun: error: unable to find utility "dsymutil", not a developer tool or in PATH

when `xcode-select -p` and VSMac are configured with two different Xcodes.
2023-01-12 07:09:57 +01:00
Rolf Bjarne Kvinge ed4d07a6c3
[msbuild] Merge the Mmp and MmpTaskBase classes. (#17098)
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.

First out is the Mmp task.
2023-01-12 07:09:42 +01:00
Rolf Bjarne Kvinge 10b1907b22
[msbuild] Fix a compile warning about file being added twice. (#17097)
Fixes:

> CSC : warning CS2002: Source file 'xamarin-macios/msbuild/Xamarin.MacDev.Tasks/Errors.designer.cs' specified multiple times
2023-01-12 07:09:17 +01:00
Manuel de la Pena 7ae82b2320
[AudioToolBox] Add nullability to files that were forgotten. (#17185) 2023-01-11 14:05:05 -05:00
Manuel de la Pena 6319d355bc
[AudioUnit] Add nullability to forgotten files. (#17186) 2023-01-11 14:04:30 -05:00
Rolf Bjarne Kvinge 4ce35769cf
[xtro] Improve assembly resolution to not load incorrect assemblies. (#17177)
Add support to xtro-sharpie for where to look for referenced assemblies, and
adjust assembly resolution to only look in those directories.

This makes sure xtro-sharpie loads the expected references, and fixes a
problem where the (broken) assembly resolution wouldn't find a .NET assembly
because it doesn't exist in legacy Xamarin (where it would look by default).

Fixes this problem that showed up in a different PR (due to new .NET API
referencing the System.Runtime.Loader assembly, which doesn't exist in legacy
Xamarin):

    mono64 --debug bin/Debug/xtro-sharpie.exe --output-directory api-annotations-dotnet appletvos16.1-arm64.pch ../../_build/Microsoft.tvOS.Runtime.tvos-arm64/runtimes/tvos-arm64/lib/net7.0/Microsoft.tvOS.dll
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.Loader, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
      at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000ff] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:172
      at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00000] in C:\src\cecil\Mono.Cecil\BaseAssemblyResolver.cs:117
      at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x0001d] in C:\src\cecil\Mono.Cecil\DefaultAssemblyResolver.cs:33
      at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x0003a] in C:\src\cecil\Mono.Cecil\MetadataResolver.cs:110
      at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00000] in C:\src\cecil\Mono.Cecil\ModuleDefinition.cs:748
      at Mono.Cecil.TypeReference.Resolve () [0x0000f] in C:\src\cecil\Mono.Cecil\TypeReference.cs:280
      at Extrospection.Helpers.GetName (Mono.Cecil.MethodDefinition self) [0x00051] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Helpers.cs:332
      at Extrospection.DesignatedInitializerCheck.VisitManagedMethod (Mono.Cecil.MethodDefinition method) [0x00001] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/DesignatedInitializerCheck.cs:43
      at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x0002b] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:104
      at Extrospection.AssemblyReader.Process () [0x0008e] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:93
      at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames, System.String outputDirectory) [0x001af] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Runner.cs:52
      at Extrospection.MainClass.Main (System.String[] arguments) [0x0008f] in /Users/rolf/work/maccore/whatever/xamarin-macios/tests/xtro-sharpie/Program.cs:28
    make: *** [.stamp-dotnet-classify-tvOS] Error 1

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-01-11 17:59:47 +01:00
Steve Hawley 553904d8a4
[dotnet] sanitized pinvokes that use string (#17143)
sanitized the pinvokes that use string.
2023-01-11 10:41:27 -05:00
Rolf Bjarne Kvinge 731a7fd781
Merge main into net8.0. (#17181) 2023-01-11 09:17:41 +01:00
Manuel de la Pena 5541f48180
[CI] Set extra parameters for the azure upload. (#17161) 2023-01-10 18:38:06 -05:00
Rolf Bjarne Kvinge a0c532afce Merge main into net8.0. 2023-01-10 21:19:12 +01:00
Rolf Bjarne Kvinge 74d7337dcc
[dotnet] Create an MSBuild property for the current min OS version. (#17034)
Create an MSBuild property for the minimum OS version
(`SupportedOSPlatformVersion`) we support for a given platform (named
`[platform]MinSupportedOSPlatformVersion`), and use it in most tests instead
of hardcoding the min OS version (which would otherwise have to be updated
every time we bump the min OS version).
2023-01-10 21:18:39 +01:00
Mauro Agnoletti 009f62ea9f
Updated MessagingVersion to 1.9.0 (#17163) 2023-01-10 08:36:36 +01:00
Rolf Bjarne Kvinge 8e98350e0a
[XKit] Fix creating NSTextLists with custom formats in .NET. Fixes #15766. (#17123)
In .NET, we changed the API for creating a NSTextList with a specified
NSTextListMarkerFormats, making NSTextListMarkerFormats a strongly typed enum,
and not allowing any other value except those in NSTextListMarkerFormats.

This was a mistake, because NSTextList can be created with other format values
than those available in NSTextListMarkerFormats.

So fix this by:

* Adding another NSTextListMarkerFormats enum value that specifies that the
  actual format is a custom one (NSTextListMarkerFormats.CustomString).
* Resurface an 'NSTextListMarkerFormats(string)' constructor that can be used
  to create an NSTextListMarkerFormats with a custom string.
* Add a NSTextListMarkerFormats.CustomMarkerFormat property that always
  retrieves the underlying string value for the format.
* Add a NSTextListOptions.None enum value, which means no options (since
  NSTextListOptions is a set of flags, it should be possible to specify no
  flags).
* Add two convenience constructors that don't take a NSTextListOptions value,
  defaulting to NSTextListOptions.None.
* Add tests!

Fixes https://github.com/xamarin/xamarin-macios/issues/15766.
2023-01-10 08:28:47 +01:00
dotnet-maestro[bot] dffdf2231d
[main] Update dependencies from dotnet/installer (#17137)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer
- **Subscription**: 50c9492e-4671-4d1d-7920-08dabd1031a2
- **Build**: 20230103.11
- **Date Produced**: January 4, 2023 1:47:28 AM UTC
- **Commit**: e0c95ad21e5eac311e454c65335008161b3e4763
- **Branch**: refs/heads/release/7.0.1xx

- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 7.0.102-servicing.22609.1 to
7.0.103-servicing.23053.11][6]

[6]: 3c4322d...e0c95ad

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-01-10 08:05:41 +01:00
Rolf Bjarne Kvinge 72257f427a
[generator] Add run configuration in csproj to run/debug the maccatalyst version. (#17124) 2023-01-09 17:50:27 +01:00
github-actions[bot] fcb1de1312
[Localization] Pulling New Localization Translations $GITHUB_RUN_ID (#17150)
Automated PR. Bring new translated changes in the lcl files for
OneLocBuild to create translated resx files.

Co-authored-by: csigs <csigs@users.noreply.github.com>
Co-authored-by: CSIGS <csigs@outlook.com>
2023-01-09 09:20:39 -06:00
Steve Hawley f54009ca3c
[dotnet] replace strings in pinvokes (#17151)
handled security pinvokes
2023-01-09 09:44:02 -05:00
dotnet-maestro[bot] c6910645af
[net8.0] Update dependencies from xamarin/xamarin-macios (#17144)
This pull request updates the following dependencies

## From https://github.com/xamarin/xamarin-macios
- **Subscription**: 69411ae3-c771-4088-2d6e-08dac814288b
- **Build**: 20221219.2
- **Date Produced**: January 5, 2023 1:51:22 AM UTC
- **Commit**: 5f4f8682e0
- **Branch**: refs/heads/release/7.0.1xx-xcode14.2

- **Updates**:
  - **Microsoft.MacCatalyst.Sdk**: [from 16.2.1003 to 16.2.1004][4]

[4]: 6ce36a1...5f4f868

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2023-01-09 11:46:14 +01:00
Rolf Bjarne Kvinge 09767dd2f9
Merge main into net8.0. (#17120) 2023-01-09 11:40:16 +01:00
Rolf Bjarne Kvinge 5e72799e28
[Foundation] Add missing fields in NSAttributedStringDocumentReadingOptionKey. (#17112) 2023-01-09 11:38:19 +01:00
dotnet-maestro[bot] 123f7f763c
[main] Update dependencies from dotnet/runtime (#17146)
This pull request updates the following dependencies

## From https://github.com/dotnet/runtime
- **Subscription**: 38d2313f-22d5-4062-c8e1-08dabd6d8c77
- **Build**: 20230104.16
- **Date Produced**: January 5, 2023 8:39:14 AM UTC
- **Commit**: a79086876caca5e38693e0a2ebfefdedf5d9b915
- **Branch**: refs/heads/release/7.0

- **Updates**:
  - **Microsoft.NETCore.App.Ref**: [from 7.0.2 to 7.0.3][4]

[4]: 8ac3832...a790868

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2023-01-09 10:57:41 +01:00
Rolf Bjarne Kvinge d09d147718
[ObjCRuntime] Enable nullability in Runtime.CoreCLR.cs (#17114)
And fix the resulting build errors+warnings.
2023-01-09 10:44:32 +01:00
Rolf Bjarne Kvinge d1aaf8e1c0
[tests] Make the helper makefiles for .NET tests more helpful. (#17122)
Make the helper makefiles for .NET tests more helpful by adding support for
universal apps, and also document the most relevant targets.
2023-01-09 10:43:45 +01:00
Rolf Bjarne Kvinge ab0294169f
[xharness] Bump the timeout for the .NET tests. (#17110)
We keep adding more and more tests...
2023-01-09 10:42:09 +01:00
Rolf Bjarne Kvinge a26e3c57f4
[tests] Enable some of the asserts in the Cecil.Tests.ApiAvailabilityTest.AttributeConsistency test. (#17113)
They're passing now.
2023-01-09 10:40:57 +01:00
Rolf Bjarne Kvinge f0644579c4
[XKit] Remove incorrect availability attribute. (#17119)
NSCocoaVersionDocumentAttribute has always been available on macOS.
2023-01-09 10:40:35 +01:00
TJ Lambert eae0930fcb
[Localization] Change the line endings to use LF instead of CRLF (#17155)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2023-01-09 10:28:08 +01:00
Steve Hawley 6e1ba31bae
[dotnet] CoreGraphics convert strings in pinvokes (#17135)
converted all pinvokes in CoreGraphics to use `IntPtr` instead of
`string`.
2023-01-06 11:24:22 -05:00
VS MobileTools Engineering Service 2 a6c71fec74
Localized file check-in by OneLocBuild Task: Build definition ID 17751: Build ID 7141571 (#17131)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2023-01-05 10:11:06 -06:00
Steve Hawley 8e0bb5d3f1
[dotnet] blitable network pinvokes (#17071)
fix all pinvokes in the Network package that use strings
2023-01-03 10:45:00 -05:00
Rolf Bjarne Kvinge 7077b5f04c
[net8.0] [tests] Ignore tests that fail due to https://github.com/dotnet/runtime/issues/78154. (#17080) 2022-12-23 11:55:12 +01:00
Rolf Bjarne Kvinge 995ceaabc4 Merge main into net8.0. 2022-12-23 10:21:29 +01:00
Rolf Bjarne Kvinge 491c5c979c
[src/tests] Fix consistency between ObsoletedOSPlatform and UnsupportedOSPlatform attributes. (#17104)
* If there's both an UnsupportedOSPlatform and ObsoletedOSPlatform attribute with
  the same version, then remove the UnsupportedOSPlatform attribute. This is because
  in the past we used [UnsupportedOSPlatform] + [Obsolete] to indicate that an API
  is obsolete, but then the [ObsoletedOSPlatform] attribute was added, and we replaced
  the [Obsolete] attributes with [ObsoletedOSPlatform] attributes, which makes the
  [UnsupportedOSPlatform] attributes redundant/incorrect.
* If there's [UnsupportedOSPlatform] with a version or [ObsoletedOSPlatform] with
  a version, then also add [SupportedOSPlatform] in a few cases.
* If there's an [UnsupportedOSPlatform] with a version for API that's obsolete/non-working,
  then remove the version.
2022-12-22 12:40:04 +01:00
Timothé Larivière 3b73bb658b
Add an additional F# template for Microsoft.iOS.iOSApp (#16823)
Closes #16822 

This PR adds an F# template to the basic Microsoft.iOS.iOSApp template.
This should allow being able to do either:

```
dotnet new ios -lang C# -n MyApp
dotnet new ios -lang F# -n MyApp
```

I had to move the C# template into a `csharp` folder.
Also added the `groupIdentity` `Microsoft.iOS.iOSApp` and set the identity for both C# and F# respectively to `Microsoft.iOS.iOSApp.CSharp` and `Microsoft.iOS.iOSApp.FSharp`

Co-authored-by: Timothé LARIVIERE <timothe.lariviere@fundourselves.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-12-22 12:04:36 +01:00
Rolf Bjarne Kvinge 2268a81bc2
[AppKit] Try to make NSWindow.ReleasedWhenClosed work. Fixes #8606. (#17105)
NSWindow.ReleasedWhenClosed is a rather annoying API, because it interferes with
reference counting. In effect it behaves kind of like autoreleasing does, except
that the object (window) is released at a different time (when the window is closed,
as opposed to when the autorelease pool drains).

We've tried to fix this in the past in several ways:

* Forcefully disable ReleasedWhenClosed in all the constructors, and if it's set
  in the Close method, then add an extra Retain call to offset the imminent extra
  release. The unfortunate side-effect is that we also call Dispose, which might
  be too early (see #8606).

* Rewrite the code to correctly override the native 'close' method, so we get the
  supposedly correct semantics (our special Close code is called) when the window
  is closed by Objective-C (for instance when the user hits the red X to close the
  window). This doesn't really solve the previous problem (we're calling Dispose
  too early), and it doesn't work for non-subclassed NSWindows (see #8717).

So I'm trying another approach: track the value of ReleasedWhenClosed, and call Retain/Release
when the value switches between true/false. This way we don't need any special logic
in the Close method.

I've also:

* Marked the ReleasedWhenClosed property as obsolete, and added a DangerousReleasedWhenClosed
  property, to match how we bind the other reference counting methods (retain ->
  DangerousRetain, release -> DangerousRelease, etc.).

* Added a ReleaseWhenClosed(bool) method, to be called instead of the ReleasedWhenClosed
  property, and this method will call DangerousRetain/DangerousRelease as described
  above when the ReleasedWhenClosed property changes value.

This new tracking behavior is opt-in for now, but will become opt-out in .NET 9,
and hopefully we'll be able to make it the only behavior at some point (in .NET 10
maybe?).

Fixes https://github.com/xamarin/xamarin-macios/issues/8606.
Fixes https://github.com/xamarin/xamarin-macios/issues/8607.

Ref: https://github.com/xamarin/xamarin-macios/pull/8717.
2022-12-22 08:16:18 +01:00
Rolf Bjarne Kvinge 7ccec765f6
Merge main into net8.0. (#17102) 2022-12-22 07:37:42 +01:00
Andoni Morales Alastruey efad190de9
[msbuild] Validate OutputType property (#16871)
Fixes #16865

```
➜  test dotnet build  -bl:msbuild.binlog
MSBuild version 17.3.2+561848881 for .NET
/usr/local/share/dotnet/sdk/6.0.403/MSBuild.dll -bl:msbuild.binlog -consoleloggerparameters:Summary -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,/usr/local/share/dotnet/sdk/6.0.403/dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,/usr/local/share/dotnet/sdk/6.0.403/dotnet.dll -maxcpucount -restore -verbosity:m ./test.csproj
  Determining projects to restore...
  All projects are up-to-date for restore.
/usr/local/share/dotnet/packs/Microsoft.macOS.Sdk/12.3.471/targets/Xamarin.Shared.Sdk.targets(284,3): error : WinExe is not a valid output type for macOS [/Users/andoni/Downloads/test/test.csproj]

Build FAILED.

/usr/local/share/dotnet/packs/Microsoft.macOS.Sdk/12.3.471/targets/Xamarin.Shared.Sdk.targets(284,3): error : WinExe is not a valid output type for macOS [/Users/andoni/Downloads/test/test.csproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.14
```

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-12-22 07:36:04 +01:00
dustin-wojciechowski b94f1c3de5
[tests] Created Test to find Getters that throw Exceptions directly. (#16923)
Added GetterExceptionTest, which examines IL of Property Getters for exceptions.

Fixes #16669

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2022-12-21 09:34:13 -08:00
Rolf Bjarne Kvinge 322ce2d412
[Foundation] Remove workaround for broken thread pool in Mono. Fixes #7080. (#17082)
Completely remove a workaround for an issue with the thread pool in Mono.
We've previously turned this workaround off by default, and we got no reports
of any problems.

Fixes https://github.com/xamarin/xamarin-macios/issues/7080.
2022-12-21 18:17:15 +01:00
Rolf Bjarne Kvinge 376081f611
[Foundation] Unify NSAttributedStringDocumentReadingOptionKeys and NSAttributedStringDocumentReadingOptionKey. (#17093)
Move the remaining field in NSAttributedStringDocumentReadingOptionKeys into
NSAttributedStringDocumentReadingOptionKey to share more code, and update code
accordingly.

Also remove redundant [Internal] attributes on
NSAttributedStringDocumentReadingOptionKey fields, because the type itself is
[Internal].

This has no effect on public API, because it's all internal.
2022-12-21 18:16:55 +01:00
Rolf Bjarne Kvinge 67607853aa
[src/tests] Improve the cecil test checking for obsolete API. (#17091)
* Hide all obsolete API using the EditorBrowsable atribute.
* Iterate over everything with availability attributes in the test.
2022-12-21 18:15:43 +01:00
Rolf Bjarne Kvinge 834bb92cb0
[tests] Update .NET tests to cope with updated min OS version and no more 32-bit iOS support. (#17088) 2022-12-21 18:15:28 +01:00
Rolf Bjarne Kvinge 37594bd8b9
[tests] Remove duplicated Import to fix build warning. (#17100)
Fixes:

    xamarin-macios/tests/framework-test/dotnet/shared.csproj(43,3): warning MSB4011: "xamarin-macios/tests/nunit.framework.targets" cannot be imported again. It was already imported at "xamarin-macios/tests/common/shared-dotnet.csproj (69,2)". This is most likely a build authoring error. This subsequent import will be ignored.
2022-12-21 18:15:02 +01:00
Rolf Bjarne Kvinge b765cf90a3
[tests] Update MTouch tests to cope with potentially higher min OS version and no 32-bit iOS support. (#17087) 2022-12-21 18:14:46 +01:00
Rolf Bjarne Kvinge cbf58c8507 Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2022-12-21 2022-12-21 17:45:21 +01:00