dotnet / dotnet/sdk

[area-Tools-ILLink]: Build errors iOS app VSX1002, IL1012 and error MSB3371.

Open
#49,845 37 comments 1 reaction 0 assignees View on GitHub
Area-ILLink untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Description

Happens with all my apps when building the app.

PS C:\Sources\MAUI\CubeSolver> dotnet publish -f:net9.0-ios -c:Release -r:ios-arm64 /p:ServerAddress=192.168.0.9 /p:ServerUser="Geert Geerits" /p:ServerPassword=xxxx /p:EnableAssemblyILStripping=false /p:_DotNetRootRemoteDirectory=/Users/geertgeerits/Library/Caches/Xamarin/XMA/SDKs/dotnet/
CubeSolver net9.0-ios failed with 1 error(s) (0,9s)
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk.net9.0_18.5\18.5.9207\tools\msbuild\iOS\Xamarin.Messaging.Build.targets(114,3): error VSX1002: The .NET runtime 9.0.5 or newer could not be found in the remote host under '/Users/geertgeerits/Library/Caches/maui/PairToMac/SDKs/dotnet/dotnet'. Please install it or try setting a different path using the MSBuild property "DotNetRuntimePath".
Build failed with 1 error(s) in 1,1s

PS C:\Sources\MAUI\CubeSolver> dotnet publish -f:net9.0-ios -c:Release -r:ios-arm64 /p:ServerAddress=192.168.0.9 /p:ServerUser="Geert Geerits" /p:ServerPassword=xxxx /p:EnableAssemblyILStripping=false /p:_DotNetRootRemoteDirectory=/Users/geertgeerits/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:DotNetRuntimePath=/usr/local/share/dotnet/dotnet
CubeSolver net9.0-ios failed with 2 error(s) and 5 warning(s) (98,2s) → CubeSolver\bin\Release\net9.0-ios\ios-arm64\CubeSolver.dll
C:\Sources\MAUI\CubeSolver\CubeSolver\ClassSpeech.cs(43,30): warning CS0168: The variable 'ex' is declared but never used
C:\Sources\MAUI\CubeSolver\CubeSolver\ClassSpeech.cs(144,30): warning CS0168: The variable 'ex' is declared but never used
C:\Sources\MAUI\CubeSolver\CubeSolver\ClassSpeech.cs(212,34): warning CS0168: The variable 'ex' is declared but never used
C:\Sources\MAUI\CubeSolver\CubeSolver\ClassFileOperations.cs(231,30): warning CS0168: The variable 'ex' is declared but never used
C:\Sources\MAUI\CubeSolver\CubeSolver\ClassCleanCubeTurns.cs(1565,30): warning CS0168: The variable 'ex' is declared but never used
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk.net9.0_18.5\18.5.9207\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(380,3): error IL1012: IL Trimmer has encountered an unexpected error. Please report the issue at https://aka.ms/report-illink
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk.net9.0_18.5\18.5.9207\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(426,3): error MSB3371: The file "obj\Release\net9.0-ios\ios-arm64\linked\Link.semaphore" cannot be created. Could not find a part of the path 'C:\Sources\MAUI\CubeSolver\CubeSolver\obj\Release\net9.0-ios\ios-arm64\linked\Link.semaphore'.
Build failed with 2 error(s)

### Reproduction Steps

dotnet publish -f:net9.0-ios -c:Release -r:ios-arm64 /p:ServerAddress=192.168.0.9 /p:ServerUser="Geert Geerits" /p:ServerPassword=xxxx /p:EnableAssemblyILStripping=false /p:_DotNetRootRemoteDirectory=/Users/geertgeerits/Library/Caches/Xamarin/XMA/SDKs/dotnet/
Gives me error VSX1002

dotnet publish -f:net9.0-ios -c:Release -r:ios-arm64 /p:ServerAddress=192.168.0.9 /p:ServerUser="Geert Geerits" /p:ServerPassword=xxxx /p:EnableAssemblyILStripping=false /p:_DotNetRootRemoteDirectory=/Users/geertgeerits/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:DotNetRuntimePath=/usr/local/share/dotnet/dotnet
Gives me error error IL1012 and error MSB3371.

The app is running in the simulator and on a connected iPad to the Mac.

### Expected behavior

Building without errors

### Actual behavior

See description

### Regression?

_No response_

### Known Workarounds

None

### Configuration

Visual Studio 2022 version 17.14.7 and 17.14.8

### Other information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.