Rename our product assemblies to:
* Microsoft.iOS.dll
* Microsoft.tvOS.dll
* Microsoft.macOS.dll
* Microsoft.MacCatalyst.dll
This makes it easy to distinguish between legacy Xamarin and .NET whenever the
product assembly is mentioned, and I've also chosen the platform part of the
name to match how the platforms are named elsewhere (this also makes it
possible to simplify our build logic, since we can remove a lot of special
casing).
Fixes https://github.com/xamarin/xamarin-macios/issues/13748.
inside it's _only_ caller and remove the API.
Remove old test that was already not useful (since the method could not
be removed anyway for quite a while).
Make the Bug2000_NSPersistentStoreCoordinator test use a test file name that
contains the process id, so that multiple test processes at the same time
don't stomp on eachother.
Fixes https://github.com/xamarin/maccore/issues/2515.
* Use 'ObjCException' instead of 'MonoTouchException' as the managed exception
type wrapping an NSException for all platforms in .NET (that was already the
case for macOS, so no change there).
* Make the ObjCException class behave like the MonoTouchException class does.
* Move the ObjCException type to the ObjCRuntime namespace in .NET.
Fixes https://github.com/xamarin/xamarin-macios/issues/13855.
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
* Update dependencies from https://github.com/dotnet/runtime build 20220117.8
Microsoft.NETCore.App.Ref
From Version 6.0.2-mauipre.1.22054.8 -> To Version 6.0.2-mauipre.1.22067.8
* [tests] Adjust according to BCL changes.
* Update dependencies from https://github.com/dotnet/runtime build 20220118.10
Microsoft.NETCore.App.Ref
From Version 6.0.2-mauipre.1.22054.8 -> To Version 6.0.2-mauipre.1.22068.10
* Update dependencies from https://github.com/dotnet/runtime build 20220119.5
Microsoft.NETCore.App.Ref
From Version 6.0.2-mauipre.1.22054.8 -> To Version 6.0.2-mauipre.1.22069.5
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
These types come from the CFNetwork.framework, but for some reason they were bound inside CoreServices many years ago.
This resolves a potential issue where we might end up linking with the
CoreServices framework instead of CFNetwork framework (because we use the
namespace of types to determine which framework they belong to).
* Remove obsolete API from .NET.
* Change API marked with XAMCORE_4_0 due to naming problems to be in .NET.
* Change API marked with XAMCORE_4_0 due to using non-generic NSDictionary to be
in XAMCORE_5_0 instead (yay!). This is because of #13704, which can make using
generic NSDictionary in API buggy, and I feel it's a bit too risky to change this
for .NET with the time we have available (no time to fix#13704). Additionally,
moving this to XAMCORE_5_0 makes it possible to keep grepping for XAMCORE_4_0 to
see what's left. Update all the CoreData API to be better as defined by our XAMCORE_4_0
define. Mostly using generic NSSet/NSDictionary types instead of the non-generic
ones, and other misc naming improvements.
* Change API marked with XAMCORE_4_0 due to both of the above to do both of the
above - add a version of the naming issue fixed for .NET + a version with the generic
dictionary for XAMCORE_5_0.
This fixes a problem where we'd build the same project reference from
dotnet-shared.csproj in parallel, and each build would stomp on eachother
(because we'll now clone the project references in dotnet-shared.csproj).
This als required updating project files to use MSBuildThisFileDirectory
instead of MSBuildProjectDirectory, which makes it easier for xharness to
inline/process these files, because MSBuildThisFileDirectory is easy to know
when processing a file, while MSBuildProjectDirectory depends on the calling
project, which complicates matters significantly.
A fix in MonoTouch.Dialog was also required.
New commits in migueldeicaza/MonoTouch.Dialog:
* migueldeicaza/MonoTouch.Dialog@59fbf5b [dotnet] Shared project files don't need the DefaultTargets/ToolsVersion/xmlns attributes.
Diff: 4d0e0a9a5f..59fbf5bb1b
Fixes https://github.com/xamarin/maccore/issues/2527.
Remove Runtime.Arch and ObjCRuntime.Arch from Mac Catalyst, because they don't
apply for a Mac Catalyst app (which is neither a simulator environment, nor a
device environment).
This means that code using these APIs will have to be re-evaluated to
determine what's the correct behavior for Mac Catalyst.
Also update our tests accordingly.
Fixes https://github.com/xamarin/xamarin-macios/issues/10312.
* Change dotnet-linker to only care about whether we're actually trimming anything or not.
* Allow LinkMde/MtouchLink to not be set if TrimMode is set.
* Detect if any assemblies are linked or not by checking the global TrimMode
property + any TrimMode properties on assemblies.
Fixes https://github.com/xamarin/xamarin-macios/issues/13518.
We are in a situation where:
1. .NET MAUI is still in preview
2. We need dotnet/runtime fixes for MAUI, but we don't necessarily want all fixes to go into the .NET 6 service release.
The solution is to simplify use different builds/packs from dotnet/runtime.
Ref: https://github.com/xamarin/xamarin-android/pull/6542
* [ObjCRuntime] Remove deprecated availability attribute API from .NET.
They're quite useful for binding code though, so instead of removing them completely,
make them binding-only attributes (like numerous other binding attributes we have)
for .NET.
* [src] Remove removed attributes from the list of attributes that should be removed by the linker.
* [tests] Update tests to not use the old attributes for .NET.
* [monotouch-test] Ignore a few tests in non-ARM64 simulators.
Some tests fail when running on an M1, but in a x64_86 mode, so just ignore
those unless we're running on ARM64 (this will currently exclude them on
x86_64 hardware too, but that'll eventually not be a problem anymore when
there's no more x86_64 hardware, and just checking for ARM64 is easier than
checking for x86_64 mode on an ARM64 CPU).
* Make more legacy projects unsafe.
* Make the .NET project files for BundleResources and EmbeddedResources follow
the pattern of all the other test projects.
* Move the LangVersion and AllowUnsafeBlocks propertieso to the shared project
file.
* [src] Remove the Xamarin.iOS.dll reference assembly for Mac Catalyst.
Xamarin.iOS.dll won't be compatible with Mac Catalyst in .NET 6 (because there
won't be any backwards compatibility), so we don't need the assembly that has
type forwarders to Xamarin.MacCatalyst.dll.
* Bump MonoTouch.Dialog
New commits in migueldeicaza/MonoTouch.Dialog:
* migueldeicaza/MonoTouch.Dialog@4d0e0a9 Remove usages of UIWebView when compiling for Mac Catalyst.
Diff: 5a05c6912e..4d0e0a9a5f
* [tests] There's no NSFileProviderPage in Mac Catalyst.
* [tests] Fix CBUUID link sdk test to work correctly on Mac Catalyst.
* Submodule MonoTouch.Dialog.
Submodule MonoTouch.Dialog, so that we can easily build it using .NET. This
submodule will become redundant when/if we publish a .NET version of
MonoTouch.Dialog, but until that happens we need it at least for our own test
suites.
This also means we have to copy our NuGet.config and global.json files to the
MonoTouch.Dialog project directory so that we point msbuild to use our local
build.
New commits in spouliot/Touch.Unit:
* spouliot/Touch.Unit@cbda703 [Touch.Client] Use MonoTouch.Dialog from a submodule. (#109)
Diff: 3345db2f4e..cbda703583
* Use relative path for submodule.
And fix indentation and set the branch name.
* Don't use 'RootTestsDirectory' when it might not be defined yet.
* [tests] Our test projects don't need to reference MonoTouch.Dialog directly.
The projects get the MonoTouch.Dialog reference indirectly through the
Touch.Client project reference.
* [tests] Only validate unique errors in the .NET unit tests.
* [tests] No need to reference System.Json anymore, that's handled directly in the MonoTouch.Dialog project.
* [tests] Reference nunit.framework.targets so we get a workaround for an NUnit issue everywhere.
* [msbuild] Only try to create a package if we're able to create an app bundle.
This fixes an issue where a library project would try (and fail) to create a
package when 'CreatePackage=true' (which could be set for the executable
project, but inherited by the library project since the executable project
depends on it).
* [tests] Adjust PackTest.BindingXcFrameworksProject to not set the AssemblyName property.
MSBuild ends up being very confused when the project we're trying to build
depends on other projects, because AssemblyName is set for all the projects
being build, and MSBuild complains about ambiguous projects:
> error: Ambiguous project name 'bindings-xcframework-test'
I recently deleted the generated makefile support for building and running our
test suites. It turned out that it was used for building the packaged
Xamarin.Mac tests, so it wasn't as unused as I thought.
So fix the building and packaging of Xamarin.Mac tests to not use the
(non-existent) makefile targets, but instead replicate it with manual make
code.
Also take the opportunity to add packaging and execution of the .NET versions
of these test suites we execute on other macOS versions (both for macOS and
the Mac Catalyst).
* [devops] Use stricter matching when finding the Xamarin.Mac pkg link.
Otherwise the branch name in any package could end up matching the pattern we
were looking for:
XM_PACKAGE=https://bosstoragemirror.blob.core.windows.net/wrench/tests-package-xamarin-mac-tests/15759261d425ae08494b0a26862a0b1356c5f8ec/5268864/package/Microsoft.iOS.Bundle.15.0.101-ci.tests-package-xamarin-mac-tests.68.pkg
is just clearly wrong.
This is to set the -dlsym:-nunit.framework.dll option, because nunit.framework.dll
contains a P/Invoke to a function that doesn't exist.
For some reason this is more of a problem in tvOS projects than iOS projects
(although it happens for iOS projects as well).
* Add support for the SupportedOSPlatformVersion MSBuild property, and write
it to the Info.plist for the corresponding minimum OS version.
* If there are any minimum OS version in the Info.plist, we'll now show an
error if it doesn't match SupportedOSPlatformVersion.
This unfortunately means that if there's any minimum OS version in any
Info.plist, then that will most likely have to be moved to the
SupportedOSPlatformVersion property (or removed entirely if that's the right
choice), since it's unlikely to match the default value for
SupportedOSPlatformVersion. However, this was deemed to be the best option for
the future (it's a one-time pain during migration).
Also add new tests, update existing tests, and update the templates.
Fixes https://github.com/xamarin/xamarin-macios/issues/12336.
* Update dependencies from https://github.com/dotnet/installer build 20210826.20
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21426.20
* Update dependencies from https://github.com/dotnet/installer build 20210827.35
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21427.35
* Update dependencies from https://github.com/dotnet/installer build 20210828.23
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21428.23
* Update dependencies from https://github.com/dotnet/installer build 20210830.3
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21430.3
* Update dependencies from https://github.com/dotnet/installer build 20210831.4
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21431.4
* Update dependencies from https://github.com/dotnet/installer build 20210901.9
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21451.9
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21419.1 -> To Version 6.0.100-preview.6.21430.2 (parent: Microsoft.Dotnet.Sdk.Internal
* [tests] Adjust path changes for tvOS
* Update dependencies from https://github.com/dotnet/installer build 20210902.10
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21452.10
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21419.1 -> To Version 6.0.100-preview.6.21430.2 (parent: Microsoft.Dotnet.Sdk.Internal
* Looks like macOS/dotnet is not quite the legacy build (which works)
* Update dependencies from https://github.com/dotnet/installer build 20210903.10
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21453.10
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21419.1 -> To Version 6.0.100-preview.6.21452.4 (parent: Microsoft.Dotnet.Sdk.Internal
* Update dependencies from https://github.com/dotnet/installer build 20210904.1
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21454.1
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21419.1 -> To Version 6.0.100-preview.6.21452.4 (parent: Microsoft.Dotnet.Sdk.Internal
* Update dependencies from https://github.com/dotnet/installer build 20210904.3
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21454.3
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21419.1 -> To Version 6.0.100-preview.6.21452.4 (parent: Microsoft.Dotnet.Sdk.Internal
* Update dependencies from https://github.com/dotnet/installer build 20210906.2
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rc.2.21425.12 -> To Version 6.0.100-rc.2.21456.2
Dependency coherency updates
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21419.1 -> To Version 6.0.100-preview.6.21452.4 (parent: Microsoft.Dotnet.Sdk.Internal
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
## 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
* [dotnet] Make CoreCLR the default for macOS.
* [dotnet] Show an error if trying to use MonoVM on macOS.
Fixes https://github.com/xamarin/xamarin-macios/issues/12477.
* [xharness] Remove CoreCLR variations for macOS tests.
The default is using CoreCLR for macOS, so having a specific variation for it
doesn't make sense.
* [tests] Adjust linker tests to work on CoreCLR as well.
Fixes these errors:
xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1140,41): error CS0246: The type or namespace name 'NSApplication' could not be found (are you missing a using directive or an assembly reference?)
xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1156,4): error CS0103: The name 'NSApplication' does not exist in the current context
xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1157,4): error CS0103: The name 'NSApplication' does not exist in the current context
This also required changing some linker code to not have platform-specific conditional compilation,
because dotnet-linker is built only once for .NET (same binary for all platforms).