* [tests] Convert mmp tests to a standard NUnit test library.
* [xharness] Add support for restoring nugets before building projects.
And restore nugets for tests-mac.sln before building mac test projects.
Given Xcode.app in /Applications/Xcode.app, mmp now accepts:
* --sdkroot=/Applications/Xcode.app
* --sdkroot=/Applications/Xcode.app/Contents
* --sdkroot=/Applications/Xcode.app/Contents/Developer
All were accepted in mtouch, but only the last one was previously accepted in
mmp.
The runtime team is going to change the default for the float 32 option.
Therefore, to avoid breaking users who are currently **not** using this option,
we need to force the use of `-float32`.
* Add new test to cover UseFloat32 = false
It does not make sense to support incremental builds for the simulator (since
no AOT compilation is done), it just makes the test matrix more complicated.
So simplify things by removing support for incremental builds.
We also ignore any (other) --assembly-build-target arguments, because building
to frameworks doesn't make sense either in the simulator.
https://bugzilla.xamarin.com/show_bug.cgi?id=55712
Some methods of NSWindow such as Miniaturize and Deminiaturize are
called by the AppKit with empty sender, which is explicitly allowed by
the documentation
(https://developer.apple.com/reference/appkit/nswindow). Overriding
these methods and calling the base class shouldn't result in
ArgumentNullException.
SetImage and SetMenu methods of NSSegmentedControl should allow
removing an image or menu from a segment by specifying a null value.
The linker doesn't allow it when building for bitcode:
> ld: -ignore_optimization_hints and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
This fixes the Xamarin.MTouch.StripBitcodeFromFrameworks(tvOS,Marker) mtouch test.
NSApplication.NextEvent treats the NSEventMask.Any as special value and
delivers Apple events (NSAppleEventManager) only when it matches the
exact value. It is thus important not to truncate it on 64-bit builds.
- SecCertificateCopyEmailAddresses behaves differently on macOS than iOS with
macOS getting the "documented" behavior of returning an empty array and iOS
returning null.
- Fix the test to just accept null or 0 elements
This dramatically decreases the size of watchOS apps built for debug when
using frameworks, because it ends up removing all the bitcode from
Mono.framework.
https://bugzilla.xamarin.com/show_bug.cgi?id=55256
* [runtime] Fix Xamarin-debug.framework's install name.
This makes building to frameworks work in debug mode.
* [mtouch] Fix check to add frameworks to watchKit extensions.
* [mtouch] Never pass -read_only_relocs to the native linker when bitcode is enabled.
* [mtouch] Bitcode requires linking with c++.
This particular case applies to shared libraries/frameworks (we already link
with c++ when building statically).
This makes registrar.h compilable as Objective-C (as opposed to
Objective-C++), because the __monoObjectGCHandle field (whose type is an C++
type) isn't there anymore.
Of particular importance is if we're building for LLVM or not: this fixes a
bug where we wouldn't pass --llvm to the AOT compiler when compiling
assemblies to frameworks (which we do when sharing code).
https://bugzilla.xamarin.com/show_bug.cgi?id=55555
CompileSceneKitAssetsTaskBase tries to set `DefiningProjectFullPath`
metadata on a new TaskItem, if it is available on the original one.
But with msbuild, this is a reserved metadata and cannot be set.
If we create the new item based on the original one, then we get the
metadata too. And we also get a `OriginalItemSpec`, which we don't need
and can remove.
This fixes a regression caused by msbuild/XS switching to use the
msbuild implementations of `Microsoft.Build.{Tasks,Utilities}.{v4.0,v12.0}`
assemblies (-> `.Core`) instead of the xbuild ones.
It manifested as:
`error MSB4018: System.ArgumentException: "DefiningProjectFullPath" is a reserved item metadata, and cannot be modified or deleted.`
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=55480https://bugzilla.xamarin.com/show_bug.cgi?id=55389
This fixes a random build failure (due to parallel make):
```
error CS0006: Metadata file `/Users/marek/git/my/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/bgen/Xamarin.Mac-mobile.BindingAttributes.dll' could not be found
Compilation failed: 1 error(s), 0 warnings
bgen: API binding contains errors.
make[1]: *** [build/mac/mobile/generated-sources] Error 1
```
For windows, ideSdkPath was defined twice.
Also the base tasks are being built only on the Mac, VSW get those from the bundle.zip, so the Windows check should be done at runtime.
When collecting a list of roots, it helps adding any roots we find to the list
of roots.
This fixes the MT0023 mtouch tests, since now we actually report MT0023
because we have a list of the root assemblies.
* Remove the MT0008 test, since the error will never be shown again.
* Check non-existent root assemblies and report MT0018 instead of MT0007 if
they look like command-line arguments.
* Collect all MT0018/MT0007 errors before reporting any of them.
We automatically add the product assembly as a root assembly when in
embeddinator mode (because other root assemblies may not reference it), but we
don't want to mark all public types from product assemblies.
[iOS]BCL test failed with Assertion failures error: * Assertion at /Users/builder/data/lanes/4691/6bea7a5b/source/xamarin-macios/external/mono/mono/mini/aot-runtime.c:2924, condition `!async' not met and condition `unwind_options == MONO_UNWIND_NONE' not
https://bugzilla.xamarin.com/show_bug.cgi?id=54658
First: only run `EnsureSdkPath` if `EnsureAppleSdkRoot` passed.
Both are based on similar install checks, `SdkIsInstalled` (used for `SdkIsInstalled`) is empty
if `IsInstalled` (used by `EnsureAppleSdkRoot`) is false.
This avoid having 2 error messages when only 1 at a time is needed.
Second: improved `EnsureAppleSdkRoot` error message mentioning the wrong Xcode developer path (which triggered the error)
as well as the exact way to fix it.