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

860 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 2ec000fde2
Add special versioning rules for 'release-test/rt/' branches to have shorter versioning. (#19396)
Long versions are sometimes problematic on Windows, because of MAX_PATH
issues. Versions for release builds don't contain the pre-release part, and
are thus usually short, but pre-release versions (which include an arbitrarily
long branch name) can get too long for Windows. This is a complication when
testing a release pipeline/process: we have to use final versioning just for
testing. This isn't ideal, so we special-case branch names that start with
`release-test/rt/`:
  * Example: `iOS 15.1.123-rt` (and nothing else). This makes these versions
    exactly 3 characters longer than the release version, which is hopefully
    enough to avoid MAX_PATH issues on Windows.
2023-11-07 15:19:01 +01:00
Rolf Bjarne Kvinge bb465c38ef
[msbuild] Don't add frameworks with static libraries to Hot Restart apps. (#19300)
The main problem is that an app with unsigned executable code will fail any signing
verification, and the app won't install on device.

This is implemented by doing two changes:

1. Augment the FilterStaticFrameworks task to only filter out frameworks with
   static libraries (and thus keeping everything that's not a static framework, even
   if it's not even a framework).

2. Execute the FilterStaticFrameworks task to filter out static frameworks from
   the entire list of files to bundle in the hot restart app bundle.
2023-10-25 08:46:20 +02:00
Rolf Bjarne Kvinge 85ddcf2006
[dotnet] Remove support for MtouchArch and XamMacArch. (#19319)
When migrating Xamarin projects to .NET projects, somewhat frequently people
will leave the MtouchArch/XamMacArch properties in their project files with
old values. This won't work, since we use RuntimeIdentifier(s) now to control
the target architecture, so remove support for MtouchArch/XamMacArch, and show
an error if we detect that they're set.

This will hopefully prevent some really confusing problems, especially in the IDEs.

Example: https://github.com/xamarin/xamarin-macios/issues/19258
2023-10-25 08:33:06 +02:00
Haritha Mohan da08b89077
[build] Add support for worktree checkouts (#19240)
Was messing around with worktrees but our repo failed to build due to
not identifying the proper git directory.

Fixes #18276
2023-10-19 09:22:37 -07:00
Steve Hawley f4a0ea9ac2
[dotnet] Test integration (#18543)
Fixed an issue where the C# class name was coming in with `,
AssemblyName` tacked on the end.
Fixed an issue where a class that had an entry in the map didn't have a
`class_ptr` which was causing an NRE.
Fixed a predicate for deciding when to mark the assembly for save.

Note - for an as yet undetermined reason, the linker is not picking up
that I'm marking the assembly for save, which is why the `true` test
cases are commented out.
This fixes issue 16671 https://github.com/xamarin/xamarin-macios/issues/16671
2023-10-17 10:29:12 -04:00
Rolf Bjarne Kvinge 57f8d8522a
[dotnet/msbuild] Create directory in the ILStrip task instead of using MSBuild logic. (#19181)
The current logic doesn't work on Windows for some reason.

Also avoid extra slash in _StrippedAssemblyDirectory, because
DeviceSpecificIntermediateOutputPath already has a trailing slash.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1864985.
2023-10-17 07:58:50 +02:00
Rolf Bjarne Kvinge 7df4fc3274
[dotnet] Complete support for universal builds when using NativeAOT. (#19183)
We couldn't do universal builds using NativeAOT, because .NET had a sanity
check that was a bit too eager and caused unnecessary build failures. We've
now been able to add an escape hatch to that sanity check, so let's use it.

This makes universal builds using NativeAOT work, so we can also enable/add
corresponding test variations in xharness.

Also ask the runtime to allow SelfContained without a RuntimeIdentifier (the
runtime has an overeager sanity check that doesn't apply to us, so we must
skip it). Fixes #19142.

Fixes https://github.com/xamarin/xamarin-macios/issues/19142.
Fixes https://github.com/xamarin/xamarin-macios/issues/19206.
2023-10-16 10:19:55 +02:00
Alex Soto facd38c2b6
[sign] Update SignList to match mlaunch list (#19187) 2023-10-13 10:59:33 -04:00
Rolf Bjarne Kvinge b39a0f3f2a Merge remote-tracking branch 'origin/net8.0' into merge-net8.0-into-main 2023-10-11 16:40:24 +02:00
Rolf Bjarne Kvinge 50c34f31a8 Merge remote-tracking branch 'origin/net8.0-xcode15' into merge-xcode15-into-net8.0 2023-10-10 23:26:57 +02:00
Rolf Bjarne Kvinge f56a2575c3
[net8.0] Revert multi-targeting support. (#19145)
It turns out to have a few sharp edges we need to smooth out first.
2023-10-10 17:20:09 +02:00
dustin-wojciechowski a64506dd4a
Revert "[MacCatalyst] Added Default Entitlements for MacCatalyst projects" (#19125)
Reverts xamarin/xamarin-macios#18669 per discussion in MAUI about sdk
defaults.
2023-10-06 13:10:28 -07:00
Rolf Bjarne Kvinge 6a63e76e74 [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-20 19:21:24 +02:00
Rolf Bjarne Kvinge 5f679459db
[dotnet] Work around an expectation mismatch between ILLink and library projects. Fixes #19037. (#19049)
ILLink doesn't handle library projects the way we need: the library is
automatically treated as a root assembly, with the entry point as the root.
This doesn't work, because library projects don't have an entry point.

In earlier versions of .NET (and Xamarin), we'd solved this by a custom linker
step that would manually root everything that needed to be rooted, but that
doesn't work anymore because we hit this sanity check in ILLink:

> ILLink : error IL1034: Root assembly 'MyExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have entry point.

Technically this happens because the library project is configured as a root
assembly, where the entry point is the root point (and in that regards the
sanity check is rather sane).

The best solution would be if we could just treat the library assembly as any
other assembly, and manually root it in our custom linker steps - but the
custom linker step we have for this kind of rooting will only iterate over
types in assemblies that are already marked somehow, and that's not
necessarily the case for app extension projects - the end result is that the
entire app extension assembly is linked away.

A close runner-up as the second best solution is to provide the API that needs
to be rooted as an xml file to the linker. This works, but we currently don't
have the infrastructure in the code to generate this xml file before running
the linker (it would be a rather major undertaking). This work is tentatively
scheduled for .NET 9 (https://github.com/xamarin/xamarin-macios/issues/17693).

So I went for the third option: set RootMode="Library" for the library
assembly. I'm not sure exactly what that means ILLink will mark, but as long
as _anything_ is marked, our custom linker step will run. This seems like an
acceptable workaround until we can implement the previous solution.

Fixes https://github.com/xamarin/xamarin-macios/issues/19037.
2023-09-20 08:24:12 +02:00
Rolf Bjarne Kvinge 79ff82d046 [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-18 18:28:24 +02:00
Filip Navara 7f737324d4
[net8.0] Remove workarounds for SDK and runtime bugs (#18830)
Fixes #18741
Fixes #18784
2023-09-15 07:43:38 +02:00
Rolf Bjarne Kvinge 15e437aad3
[net8.0] Merge main into net8.0. (#19023) 2023-09-14 12:35:47 +02:00
Rolf Bjarne Kvinge 65f275b842
[dotnet] Load the current, not latest, sdk for the error logic in WorkloadManifest.targets. (#19011)
We might actually support a newer OS version than the one we're building for,
if we're supporting a preview version in a stable release. In this case, we
need to make sure to load the correct sdk when we run into errors, so that we
show the correct error messages.

Fixes this test failure:

    Xamarin.Tests.DotNetProjectTest.InvalidTargetPlatformVersion(MacCatalyst): Error message
    Expected string length 92 but was 87. Strings differ at index 84.
    Expected: "...ormVersion for MacCatalyst. Valid versions include:\n16.4\n17.0"
    But was: "...ormVersion for MacCatalyst. Valid versions include:\n17.0"
2023-09-14 10:15:02 +02:00
Rolf Bjarne Kvinge be6c348cfd [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-14 07:25:58 +02:00
Rolf Bjarne Kvinge f88dc4406d [net8.0] Merge main into net8.0. 2023-09-14 07:23:52 +02:00
Rolf Bjarne Kvinge c901665f34
[net8.0] [devops] Fix boolean logic + update .NET files to sign (#18988)
* Fix boolean logic to determine whether .NET is enabled or not
* Update mlaunch to get a fix where we trim the project.
* Update the list of files that need to be signed from mlaunch.
2023-09-11 18:56:47 +02:00
Rolf Bjarne Kvinge ea8ad15db0
[dotnet] Copy the pdb for our platform assemblies to the app bundle. Fixes #11879. (#18970)
Copy the pdb for our platform assembly to the app bundle if we're in
Debug mode.

Fixes https://github.com/xamarin/xamarin-macios/issues/11879.
2023-09-11 18:36:59 +02:00
Rolf Bjarne Kvinge 9d8962c06c [net8.0] Merge main into net8.0. 2023-09-11 10:31:07 +02:00
Rolf Bjarne Kvinge de762d67cc
[dotnet] Point app extensions to any frameworks in the root app bundle. Fixes #17876. (#18913)
Put any frameworks in app extensions in the Frameworks directory in the
containing app bundle. This saves a lot of space if the same framework is used
in both an app extension and the containing project (or multiple app
extensions).

Fixes https://github.com/xamarin/xamarin-macios/issues/17876.
Fixes https://github.com/xamarin/xamarin-macios/issues/17679.
2023-09-11 09:52:54 +02:00
Rolf Bjarne Kvinge b44b57e59d
[dotnet] Make bundling the 'createdump' utility opt-in. Fixes #16189. (#18960)
Make bundling the 'createdump' utility opt-in by setting BundleCreateDump=true.

Fixes: https://github.com/xamarin/xamarin-macios/issues/16189
2023-09-11 09:52:14 +02:00
Ivan Povazan bf77022512
Simplify icudat file lookup by specifying ICU_DAT_FILE_PATH as a RuntimeHostConfigurationOption (#18914)
Fixes https://github.com/xamarin/xamarin-macios/issues/18471
2023-09-08 16:46:32 +02:00
Rolf Bjarne Kvinge 673dd5782b [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-08 10:31:44 +02:00
Šimon Rozsíval aef2c916e9
[NativeAOT] Do not root platform assembly (#18885)
Closes #18779

Based on testing several MAUI samples, there doesn't seem to be a reason
to root the whole platform assembly anymore.
2023-09-07 08:13:02 +02:00
Rolf Bjarne Kvinge 42f523812f [dotnet] Add support for multi-targeting. 2023-09-06 11:32:54 +02:00
Rolf Bjarne Kvinge 19f30a1f06 [dotnet] Rename packs to contain target framework. 2023-09-06 11:29:16 +02:00
Rolf Bjarne Kvinge b3c869080e
Merge branch 'net8.0' into new-find-icu-data 2023-09-05 08:48:37 +02:00
Rolf Bjarne Kvinge 50071c37c9
[NativeAOT] Don't publish any *.o files that comes from NativeAOT. (#18904)
If anything we're supposed to link with *.o files, not publish them, but
since we're currently not handling any *.o files, just explicitly remove them
from the build. This avoids a warning where ComputeBundleLocation would issue
a warning about not knowing what to do with them.

Contributes towards https://github.com/xamarin/xamarin-macios/issues/18629.

---------

Co-authored-by: Ivan Povazan <55002338+ivanpovazan@users.noreply.github.com>
2023-09-05 08:07:19 +02:00
Ivan Povazan ed26faa94f Simplify icudat file lookup by specifying ICU_DAT_FILE_PATH as a RuntimeHostConfigurationOption 2023-09-01 18:50:55 +02:00
Rolf Bjarne Kvinge 4f26004591
[dotnet] Pass path to native swift libraries when linking NativeAOT apps for macOS. (#18894)
Fixes this linker failure when compiling monotouch-test:

    clang: error: linker command failed with exit code 1 (use -v to see invocation)
        Errors
            xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.2.23428.11/packs/Microsoft.macOS.Sdk/13.3.8852-net8-rc2/targets/Xamarin.Shared.Sdk.targets(1527,3): clang++ exited with code 1:
    ld: library not found for -lswiftCore
    clang: error: linker command failed with exit code 1 (use -v to see invocation) [/Users/rolf/work/maccore/net8.0/xamarin-macios/tests/dotnet/MySimpleApp/macOS/MySimpleApp.csproj]
2023-09-01 10:55:59 +02:00
Rolf Bjarne Kvinge ef408d24a9 [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-29 11:53:41 +02:00
Rolf Bjarne Kvinge 78b649c4e1 [net8.0] Merge main into net8.0. 2023-08-29 11:24:40 +02:00
Rolf Bjarne Kvinge 45225dc88d
[dotnet] Parameterize the pack names. (#18732)
We're going to change the pack names to support multi-targeting, so ahead
of the pack name change I'm changing the existing logic to use a variable
for the pack name in most places (this will make the rename much easier and
simpler).

These changes should have no effect by themselves.
2023-08-29 10:06:46 +02:00
Rolf Bjarne Kvinge ed4d4ff028
[dotnet] Always pass -lobjc to the native linker. (#18845)
In some cases ld will crash otherwise:

    0  0x102a1871c  __assert_rtn + 140
    1  0x102a21688  ld::tool::SymbolTableAtom<arm64>::classicOrdinalForProxy(ld::Atom const*) (.cold.3) + 0
    2  0x10291daf8  ld::tool::SymbolTableAtom<arm64>::classicOrdinalForProxy(ld::Atom const*) + 248
    3  0x10291d15c  ld::tool::SymbolTableAtom<arm64>::addImport(ld::Atom const*, ld::tool::StringPoolAtom*) + 204
    4  0x10291c824  ld::tool::SymbolTableAtom<arm64>::encode() + 416
    5  0x102907b6c  ___ZN2ld4tool10OutputFile20buildLINKEDITContentERNS_8InternalE_block_invoke.387 + 36
    6  0x185df2874  _dispatch_call_block_and_release + 32
    7  0x185df4400  _dispatch_client_callout + 20
    8  0x185e060c8  _dispatch_root_queue_drain + 956
    9  0x185e066c0  _dispatch_worker_thread2 + 164
    10  0x185fa0038  _pthread_wqthread + 228
    A linker snapshot was created at:
    	/tmp/tesrt-2023-08-28-143541.ld-snapshot
    ld: Assertion failed: (it != _dylibToOrdinal.end()), function dylibToOrdinal, file OutputFile.cpp, line 5133.
2023-08-29 07:28:47 +02:00
Rolf Bjarne Kvinge 645ce96798 [net8.0] Merge main into net8.0. 2023-08-28 18:16:00 +02:00
dustin-wojciechowski 1b016fa072
[MacCatalyst] Added Default Entitlements for MacCatalyst projects (#18669)
Added default entitlements for MacCatalyst templates.
For Debug, the com.apple.security.get-task-allow entitlement that allows for using developer tools when developing MAUI Blazor apps.
For release, com.apple.security.app-sandbox is required to publish MacCatalyst apps to the Mac App Store.

Also added unit test to check for entitlements when project is created.

Fixes #18344

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-08-28 09:14:25 -07:00
Filip Navara 88b009288d
Improve consumption of NativeAOT linker flags (#18835)
Fixes #18819
2023-08-28 12:17:09 +02:00
Rolf Bjarne Kvinge 7d5e1a4e7e [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-23 17:35:17 +02:00
Rolf Bjarne Kvinge 640ff3fa71 [net8.0] Merge main into net8.0. 2023-08-22 15:22:11 +02:00
Rolf Bjarne Kvinge 2091e09592
[net8.0] Merge main into net8.0 (#18770) 2023-08-22 15:19:06 +02:00
Rolf Bjarne Kvinge c024223ca9
[dotnet] Make 'Full' the default link mode for NativeAOT. (#18734)
Make 'Full' the default link mode for all platforms for NativeAOT because:

* It will achieve the best app size.
* NativeAOT is not a drop-in replacement that's guaranteed to work - there are
  already known features NativeAOT don't support (and may never support), so
  this may be an opportunity for app developers (and component vendors) to
  make their products trimmer safe.
* NativeAOT will be in preview in .NET 8, so we can change our mind later if
  it turns out to cause too many problems.
* In some cases NativeAOT might require trimming, because we may
  optimize/rewrite assemblies to be NativeAOT-compatible to support existing
  libraries.

This requires #18666 to be merged first, so that ests aren't linked away.
2023-08-22 12:46:53 +02:00
Ivan Povazan fa06001335
Use RuntimeHostConfigurationOption for ObjCRuntime features (#18763)
This PR unifies the way `ObjCRuntime` features are passed to trimming
tools by using `RuntimeHostConfigurationOption`.

---
Fixes: https://github.com/xamarin/xamarin-macios/issues/18483
2023-08-21 10:57:52 +02:00
Rolf Bjarne Kvinge 19b2b3744f
[NativeAOT] Add support for [Preserve] attributes (#18666)
Add partial support for the `[Preserve]` attribute for NativeAOT. This
is done by injecting an equivalent `[DynamicDependency]` attribute. The
partial support comes from the fact that there's no way to map a
conditional preserve attribute (`[Preserve (Conditional = true)]`) to a
`[DynamicDependency]` attribute, so we report a warning instead.

For non-conditional `[Preserve]` attributes, we'll now add a
`[DynamicDependency]` attribute to the assembly's module constructor for
the type/member in question, effectively rooting it.

This makes it possible to fully link all our test suites when NativeAOT
(otherwise NativeAOT would just link out all the tests, leaving the test
suites empty - and unfortunately green, so this was a rather accidental
discovery).
2023-08-18 16:49:47 +02:00
Rolf Bjarne Kvinge 067e32a289
[dotnet] Update the Mac Catalyst VB template to match the C# template. (#18754) 2023-08-18 16:49:18 +02:00
Rolf Bjarne Kvinge d64f3d5e30
[dotnet] Fix typo when loading support for App Extensions on Mac Catalyst. (#18755)
Ref: https://github.com/xamarin/xamarin-macios/issues/17408
2023-08-18 16:48:51 +02:00
Ivan Povazan 90cc165def
NativeAOT: Do not suppress trim warnings by default with NativeAOT (#18759)
This PR enables trim warnings with NativeAOT by default.

In our current ILLink+ILC setup, we first need to suppress the warnings for ILLink, after which we need to enable them for ILC. 
For this reason, setting up `SuppressTrimAnalysisWarnings` properly needs to happen very early as it will get overwritten by 45acd380b3/src/tools/illink/src/ILLink.Tasks/build/Microsoft.NET.ILLink.targets (L54-L59) 

Verified with building an iOS application that the trim warnings are displayed only during ILC trimming (after `Generating native code` message below):
```                 
../dotnet publish -c Release -r ios-arm64 -bl /p:PublishAot=true /p:PublishAotUsingRuntimePack=true
MSBuild version 17.7.0+5785ed5c2 for .NET
  Determining projects to restore...
  Restored /Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj (in 127 ms).
/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/sdk/8.0.100-rc.1.23415.19/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(311,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
  Detected signing identity:
          
    Code Signing Key: "Apple Development: Ivan Povazan (53PXX466YZ)" (3CC7B9372E3BB19DEBECBA95A6AF3E0EB26C5B29)
    Provisioning Profile: "iOS Team Provisioning Profile: *" (6e598984-dd21-4632-b707-72cfa247991d)
    Bundle Id: com.companyname.TrimTest
    App Id: SGGM6D27TK.com.companyname.TrimTest
  TrimTest -> /Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/bin/Release/net8.0-ios/ios-arm64/TrimTest.dll
/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/packs/Microsoft.iOS.Sdk/16.4.8777-ci.trim-warn/targets/Xamarin.Shared.Sdk.targets(1826,3): warning : The file '/Users/ivan/repos/xamarin/xamarin-macios/packages/microsoft.netcore.app.runtime.nativeaot.ios-arm64/8.0.0-rc.1.23414.4/runtimes/ios-arm64/native/libbootstrapper.o' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/packs/Microsoft.iOS.Sdk/16.4.8777-ci.trim-warn/targets/Xamarin.Shared.Sdk.targets(1826,3): warning : The file '/Users/ivan/repos/xamarin/xamarin-macios/packages/microsoft.netcore.app.runtime.nativeaot.ios-arm64/8.0.0-rc.1.23414.4/runtimes/ios-arm64/native/libbootstrapperdll.o' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/packs/Microsoft.iOS.Sdk/16.4.8777-ci.trim-warn/targets/Xamarin.Shared.Sdk.targets(536,3): warning : All assemblies must be processed by the linker when using NativeAOT. Please don't set neither the 'MtouchLink' nor the 'TrimMode' property, so that the build can default to linking all assemblies. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
  Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Optimizing assemblies for size. This process might take a while.
  Generating native code
resource ILLink.LinkAttributes.xml in System.Private.CoreLib(335,8): warning IL2049: System.Private.CoreLib: The internal attribute name 'RemoveAttributeInstances' being used in the xml is not supported by ILLink, check the spelling and the supported internal attributes. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
resource ILLink.LinkAttributes.xml in System.Private.CoreLib(342,8): warning IL2049: System.Private.CoreLib: The internal attribute name 'RemoveAttributeInstances' being used in the xml is not supported by ILLink, check the spelling and the supported internal attributes. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
resource ILLink.LinkAttributes.xml in System.Private.CoreLib(349,8): warning IL2049: System.Private.CoreLib: The internal attribute name 'RemoveAttributeInstances' being used in the xml is not supported by ILLink, check the spelling and the supported internal attributes. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
resource ILLink.LinkAttributes.xml in System.Private.CoreLib(356,8): warning IL2049: System.Private.CoreLib: The internal attribute name 'RemoveAttributeInstances' being used in the xml is not supported by ILLink, check the spelling and the supported internal attributes. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
resource ILLink.LinkAttributes.xml in System.Private.CoreLib(363,8): warning IL2049: System.Private.CoreLib: The internal attribute name 'RemoveAttributeInstances' being used in the xml is not supported by ILLink, check the spelling and the supported internal attributes. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
resource ILLink.LinkAttributes.xml in System.Private.CoreLib(370,8): warning IL2049: System.Private.CoreLib: The internal attribute name 'RemoveAttributeInstances' being used in the xml is not supported by ILLink, check the spelling and the supported internal attributes. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
/Users/ivan/repos/xamarin/xamarin-macios/src/ObjCRuntime/Runtime.CoreCLR.cs(171): Trim analysis warning IL2026: ObjCRuntime.Runtime.ResolvingEventHandler(AssemblyLoadContext,AssemblyName): Using member 'System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types and members the loaded assembly depends on might be removed. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
/Users/ivan/repos/xamarin/xamarin-macios/src/ObjCRuntime/Runtime.CoreCLR.cs(267): Trim analysis warning IL2026: ObjCRuntime.Runtime.FindAssembly(IntPtr): Using member 'System.Reflection.Assembly.LoadFrom(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Types and members the loaded assembly depends on might be removed. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.iOS.dll : warning IL3053: Assembly 'Microsoft.iOS' produced AOT analysis warnings. [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/obj/Release/net8.0-ios/ios-arm64/linked/Microsoft.iOS.dll : warning IL2104: Assembly 'Microsoft.iOS' produced trim warnings. For more information see https://aka.ms/dotnet-illink/libraries [/Users/ivan/repos/xamarin/xamarin-macios/builds/downloads/dotnet-sdk-8.0.100-rc.1.23415.19/TrimTest/TrimTest.csproj]
  Created the package: bin/Release/net8.0-ios/ios-arm64/publish//TrimTest.ipa
```

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

---------

Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
2023-08-18 16:04:00 +02:00