Apple platform
iOS
Framework version
net10.0-*
Affected platform version
.NET SDK 10.0.300 and iOS workload 26.5.10284
Description
This appears to be a regression in the .NET iOS workload.
For an iOS app targeting net10.0-ios, running dotnet publish directly produces the expected smaller app bundle.
However, if dotnet build is run first, and then dotnet publish is run on the same project with the same configuration and RID, the final .app / .ipa incorrectly includes extra managed assemblies and *.aotdata.arm64 files in the app bundle.
This significantly increases the final app size and changes the published payload contents, even though publish should produce the same final bundle regardless of whether build was run beforehand.
The behavior looks like dotnet publish is reusing stale outputs left by dotnet build and is not cleaning those files from the app bundle before creating the final IPA.
I noticed this seeing that the size of iOS artifacts were much bigger when compared with previous builds.
Steps to Reproduce
Using a minimal iOS app (iOSTest.csproj):
- Clean outputs.
- Run:
dotnet restore /Users/viniciusjarina/projects/iOSTest/iOSTest.csproj -r ios-arm64
dotnet build -c Release -r ios-arm64 /Users/viniciusjarina/projects/iOSTest/iOSTest.csproj
dotnet publish -c Release -r ios-arm64 -p:ArchiveOnBuild=true -p:BuildIpa=true /Users/viniciusjarina/projects/iOSTest/iOSTest.csproj
- Inspect:
/Users/viniciusjarina/projects/iOSTest/bin/Release/net10.0-ios/ios-arm64/iOSTest.app
- Clean outputs again.
- Run only:
dotnet restore /Users/viniciusjarina/projects/iOSTest/iOSTest.csproj -r ios-arm64
dotnet publish -c Release -r ios-arm64 -p:ArchiveOnBuild=true -p:BuildIpa=true /Users/viniciusjarina/projects/iOSTest/iOSTest.csproj
- Inspect the same app bundle and compare contents.
Expected behavior
Running dotnet build before dotnet publish should not change the final published app bundle contents.
The final .app / .ipa should match the publish-only result and should not contain stale managed assemblies or .aotdata files.
Actual behavior
After dotnet build -> dotnet publish, the app bundle contains extra files that are not present in the publish-only output.
On the minimal repro app, these extra files are:
Microsoft.iOS.aotdata.arm64
Microsoft.iOS.dll
System.ComponentModel.TypeConverter.aotdata.arm64
System.ComponentModel.TypeConverter.dll
System.Drawing.Primitives.aotdata.arm64
System.Drawing.Primitives.dll
System.Drawing.aotdata.arm64
System.Drawing.dll
System.ObjectModel.aotdata.arm64
System.ObjectModel.dll
System.Private.CoreLib.aotdata.arm64
System.Private.CoreLib.dll
System.Runtime.aotdata.arm64
System.Runtime.dll
aot-instances.aotdata.arm64
iOSTest.aotdata.arm64
iOSTest.dll
Bundle comparison from the repro app:
- build -> publish: 26 files, 5,539,028 bytes
- publish only: 9 files, 2,986,340 bytes
Regression?
Yes, likely.
Known-good CI evidence from 2026-04-07:
- .NET SDK: 10.0.201
- iOS workload: 26.2.10217
- Host: osx-x64
That CI build ran dotnet build before dotnet publish and still produced a small IPA.
Known-bad evidence:
- local repro with SDK 10.0.201 / 10.0.202 using iOS workload 26.2.10233
- local repro with SDK 10.0.300 using iOS workload 26.5.10284
This suggests the regression may have been introduced between:
- 26.2.10217 (good)
- 26.2.10233 (bad)
Environment
Minimal repro environment:
.NET SDK:
Version: 10.0.300
Workload version: 10.0.300-manifests.2db5797b
Installed workloads:
ios 26.5.10284/10.0.100
maccatalyst 26.5.10284/10.0.100
macos 26.5.10284/10.0.100
tvos 26.5.10284/10.0.100
Additional notes
This also reproduces on a larger real project, but the minimal iOSTest repro is enough to demonstrate the problem clearly.
Relevant workload source area:
It appears _CoreCreateIpa packages the existing app bundle as-is, while stale files left by the earlier build step are still present in AppBundleDir and are not removed before publish/package.
Did you find any workaround?
Avoid call dotnet build before call dotnet publish
Build logs
Binlogs.zip
Apple platform
iOS
Framework version
net10.0-*
Affected platform version
.NET SDK 10.0.300 and iOS workload 26.5.10284
Description
This appears to be a regression in the .NET iOS workload.
For an iOS app targeting
net10.0-ios, runningdotnet publishdirectly produces the expected smaller app bundle.However, if
dotnet buildis run first, and thendotnet publishis run on the same project with the same configuration and RID, the final.app/.ipaincorrectly includes extra managed assemblies and*.aotdata.arm64files in the app bundle.This significantly increases the final app size and changes the published payload contents, even though
publishshould produce the same final bundle regardless of whetherbuildwas run beforehand.The behavior looks like
dotnet publishis reusing stale outputs left bydotnet buildand is not cleaning those files from the app bundle before creating the final IPA.I noticed this seeing that the size of iOS artifacts were much bigger when compared with previous builds.
Steps to Reproduce
Using a minimal iOS app (
iOSTest.csproj):/Users/viniciusjarina/projects/iOSTest/bin/Release/net10.0-ios/ios-arm64/iOSTest.app
Expected behavior
Running dotnet build before dotnet publish should not change the final published app bundle contents.
The final .app / .ipa should match the publish-only result and should not contain stale managed assemblies or .aotdata files.
Actual behavior
After dotnet build -> dotnet publish, the app bundle contains extra files that are not present in the publish-only output.
On the minimal repro app, these extra files are:
Microsoft.iOS.aotdata.arm64
Microsoft.iOS.dll
System.ComponentModel.TypeConverter.aotdata.arm64
System.ComponentModel.TypeConverter.dll
System.Drawing.Primitives.aotdata.arm64
System.Drawing.Primitives.dll
System.Drawing.aotdata.arm64
System.Drawing.dll
System.ObjectModel.aotdata.arm64
System.ObjectModel.dll
System.Private.CoreLib.aotdata.arm64
System.Private.CoreLib.dll
System.Runtime.aotdata.arm64
System.Runtime.dll
aot-instances.aotdata.arm64
iOSTest.aotdata.arm64
iOSTest.dll
Bundle comparison from the repro app:
Regression?
Yes, likely.
Known-good CI evidence from 2026-04-07:
That CI build ran dotnet build before dotnet publish and still produced a small IPA.
Known-bad evidence:
This suggests the regression may have been introduced between:
Environment
Minimal repro environment:
.NET SDK:
Version: 10.0.300
Workload version: 10.0.300-manifests.2db5797b
Installed workloads:
ios 26.5.10284/10.0.100
maccatalyst 26.5.10284/10.0.100
macos 26.5.10284/10.0.100
tvos 26.5.10284/10.0.100
Additional notes
This also reproduces on a larger real project, but the minimal iOSTest repro is enough to demonstrate the problem clearly.
Relevant workload source area:
It appears _CoreCreateIpa packages the existing app bundle as-is, while stale files left by the earlier build step are still present in AppBundleDir and are not removed before publish/package.
Did you find any workaround?
Avoid call
dotnet buildbefore calldotnet publishBuild logs
Binlogs.zip