Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.net maui publish failed with Fatal error in IL Linker #3236

Open
cworth33 opened this issue Oct 26, 2023 · 2 comments
Open

.net maui publish failed with Fatal error in IL Linker #3236

cworth33 opened this issue Oct 26, 2023 · 2 comments

Comments

@cworth33
Copy link

Fatal error in IL Linker
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\16.4.7098\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(364,3): error IL1012: IL Trimmer has encountered an unexpected error. Please report the iss
ue at https://github.com/dotnet/linker/issues [C:\Code\SafetyAuditor\SafetyAuditor.Maui\SafetyAuditor.Maui.csproj::TargetFramework=net7.0-ios]
Unhandled exception. System.IO.FileNotFoundException: Could not find file '/Users/user249366/Library/Caches/Xamarin/mtbs/builds/SafetyAuditor.Maui/5acaf6ad451ec720ca67a28f807064e639441edc6ef36950ab91d2808f0
6d39f/C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/7.0.10/runtimes/ios-arm64/lib/net7.0/Microsoft.VisualBasic.dll'.
File name: '/Users/user249366/Library/Caches/Xamarin/mtbs/builds/SafetyAuditor.Maui/5acaf6ad451ec720ca67a28f807064e639441edc6ef36950ab91d2808f06d39f/C:/Program Files/dotnet/packs/Microsoft.NETCore.App.Runti
me.Mono.ios-arm64/7.0.10/runtimes/ios-arm64/lib/net7.0/Microsoft.VisualBasic.dll'
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Func4 createOpenException) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& f ileLength, UnixFileMode& filePermissions, Func4 createOpenException)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync)
at Mono.Linker.AssemblyResolver.GetAssembly(String file)
at Mono.Linker.AssemblyResolver.ResolveFromReferences(AssemblyNameReference name)
at Mono.Linker.AssemblyResolver.Resolve(AssemblyNameReference name, Boolean probing)
at Mono.Linker.Steps.ProcessReferencesStep.Process()
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Mono.Linker.Driver.Run(ILogger customLogger)
at Mono.Linker.Driver.Main(String[] args)
C:\Program Files\dotnet\packs\Microsoft.iOS.Windows.Sdk\16.4.7098\tools\msbuild\iOS\Xamarin.iOS.Common.After.targets(405,3): error MSB3371: The file "obj\Release\net7.0-ios\ios-arm64\linked\Link.semaphore" ca
nnot be created. Could not find a part of the path 'C:\Code\SafetyAuditor\SafetyAuditor.Maui\obj\Release\net7.0-ios\ios-arm64\linked\Link.semaphore'. [C:\Code\SafetyAuditor\SafetyAuditor.Maui\SafetyAuditor.Ma
ui.csproj::TargetFramework=net7.0-ios]

@marek-safar
Copy link
Contributor

There is interesting mix of Windows on Unix paths. What setup are you running on?

@lostmsu
Copy link

lostmsu commented Jun 16, 2024

I've got the same problem. I am on Windows 11 and Visual Studio is connected to a MacOS. For me this happens during regular build in VS. The DLL is 8.0.5/runtimes/iossimulator-arm64/lib/net8.0/System.Security.Claims.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants