Description
Hi.
We're upgrading our iOS project from .NET 8 to .NET 10 and we're encountering the following error:
* Assertion at /Users/runner/work/1/s/src/runtime/src/mono/mono/mini/method-to-ir.c:4916,
condition `is_ok (cfg->error)' not met, function:inline_method,
Field not found: !2 osu.Framework.Graphics.Transforms.Transform`3.<Target>k__BackingField
Due to: Could not find field in class
18:23:00.910 1:7>/Users/smgi/.dotnet/packs/Microsoft.iOS.Sdk.net10.0_26.5/26.5.10284/targets/Xamarin.Shared.Sdk.targets(1523,3):
error : Failed to AOT compile aot-instances.dll, the AOT compiler exited with code 134. [/Users/smgi/Repos/osu-framework/SampleGame.iOS/SampleGame.iOS.csproj]
The error occurs here: https://github.com/ppy/osu-framework/blob/8afe8a5ea4489019bab0978274383865971b1141/osu.Framework/Graphics/Transforms/Transform.cs#L105-L107
- Build passes when the relevant code is extracted to an isolated project.
- Build fails after removing all references to
Target but leaving the property in place.
- Build fails after applying
[MethodImpl(NoInlining)] to the property.
- Build passes after transforming the property to a field.
Of note, the Easing property highlighted by the above perma link also exhibits the same behaviour in all cases. So for example when I say "transforming the property to a field", I mean transforming both of those properties
I'm at a loss how to debug this further.
Reproduction Steps
- Clone + checkout smoogipoo/osu-framework@37cd1e8
- Navigate to SampleGame.iOS
- Run
dotnet publish -r ios-arm64
Expected behavior
The build to complete successfully.
Actual behavior
The build fails with the error above.
Regression?
This previously worked on .NET 8.
Known Workarounds
The build passes when the interpreter is used.
Configuration
$ dotnet --info
.NET SDK:
Version: 10.0.300
Commit: caa81fa497
Workload version: 10.0.301.1
MSBuild version: 18.6.3+caa81fa49
Runtime Environment:
OS Name: Mac OS X
OS Version: 26.3
OS Platform: Darwin
RID: osx-arm64
Base Path: /Users/smgi/.dotnet/sdk/10.0.300/
.NET workloads installed:
[ios]
Installation Source: SDK 10.0.300
Manifest Version: 26.5.10284/10.0.100
Manifest Path: /Users/smgi/.dotnet/sdk-manifests/10.0.100/microsoft.net.sdk.ios/26.5.10284/WorkloadManifest.json
Install Type: FileBased
[android]
Installation Source: SDK 10.0.300
Manifest Version: 36.1.69/10.0.100
Manifest Path: /Users/smgi/.dotnet/sdk-manifests/10.0.100/microsoft.net.sdk.android/36.1.69/WorkloadManifest.json
Install Type: FileBased
Configured to use workload sets when installing new manifests.
Host:
Version: 10.0.8
Architecture: arm64
Commit: 94ea82652c
.NET SDKs installed:
8.0.421 [/Users/smgi/.dotnet/sdk]
10.0.300 [/Users/smgi/.dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.27 [/Users/smgi/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.8 [/Users/smgi/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.27 [/Users/smgi/.dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.8 [/Users/smgi/.dotnet/shared/Microsoft.NETCore.App]
Other information
No response
Description
Hi.
We're upgrading our iOS project from .NET 8 to .NET 10 and we're encountering the following error:
The error occurs here: https://github.com/ppy/osu-framework/blob/8afe8a5ea4489019bab0978274383865971b1141/osu.Framework/Graphics/Transforms/Transform.cs#L105-L107
Targetbut leaving the property in place.[MethodImpl(NoInlining)]to the property.Of note, the
Easingproperty highlighted by the above perma link also exhibits the same behaviour in all cases. So for example when I say "transforming the property to a field", I mean transforming both of those propertiesI'm at a loss how to debug this further.
Reproduction Steps
dotnet publish -r ios-arm64Expected behavior
The build to complete successfully.
Actual behavior
The build fails with the error above.
Regression?
This previously worked on .NET 8.
Known Workarounds
The build passes when the interpreter is used.
Configuration
Other information
No response