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

Error IL1012: Fatal error in IL Linker, Unhandled exception. System.NotImplementedException: Unhandled intrinsic #3218

Open
jlchavez opened this issue Jun 8, 2023 · 1 comment

Comments

@jlchavez
Copy link

jlchavez commented Jun 8, 2023

Following instructions:
SDK: .NET 7.0.201
Visual Studio 2022 17.5.1
Publishing a project with .NET 7, .NET Standard 2.1 and Blazor WASM

07:51:35:266 ILLink(0,0): Error IL1012: IL Trimmer has encountered an unexpected error. Please report the issue at https://github.com/dotnet/linker/issues
07:51:35:319 Fatal error in IL Linker
07:51:35:319 Unhandled exception. System.NotImplementedException: Unhandled intrinsic
07:51:35:319 at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.HandleCall(Instruction operation, MethodReference calledMethod, ValueSet1 instanceValue, ImmutableArray1 argumentValues, DiagnosticContext diagnosticContext, ReflectionMarker reflectionMarker, LinkContext context, MarkStep markStep, ValueSet1& methodReturnValue) 07:51:35:319 at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.HandleCall(MethodBody callingMethodBody, MethodReference calledMethod, Instruction operation, ValueNodeList methodParams, ValueSet1& methodReturnValue)
07:51:35:319 at Mono.Linker.Dataflow.MethodBodyScanner.HandleCall(MethodBody callingMethodBody, Instruction operation, Stack1 currentStack, Dictionary2 locals, InterproceduralState& interproceduralState, Int32 curBasicBlock)
07:51:35:319 at Mono.Linker.Dataflow.MethodBodyScanner.Scan(MethodBody methodBody, InterproceduralState& interproceduralState)
07:51:35:319 at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.Scan(MethodBody methodBody, InterproceduralState& interproceduralState)
07:51:35:319 at Mono.Linker.Dataflow.MethodBodyScanner.InterproceduralScan(MethodBody startingMethodBody)
07:51:35:319 at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.InterproceduralScan(MethodBody methodBody)
07:51:35:319 at Mono.Linker.Steps.MarkStep.MarkReflectionLikeDependencies(MethodBody body, Boolean requiresReflectionMethodBodyScanner)
07:51:35:319 at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
07:51:35:319 at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason, MessageOrigin& origin)
07:51:35:319 at Mono.Linker.Steps.MarkStep.ProcessQueue()
07:51:35:319 at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
07:51:35:319 at Mono.Linker.Steps.MarkStep.Process()
07:51:35:319 at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
07:51:35:319 at Mono.Linker.Pipeline.Process(LinkContext context)
07:51:35:319 at Mono.Linker.Driver.Run(ILogger customLogger)
07:51:35:319 at Mono.Linker.Driver.Main(String[] args)
07:51:39:577 C:\Program Files\dotnet\sdk\7.0.201\Sdks\Microsoft.NET.ILLink.Tasks\build\Microsoft.NET.ILLink.targets(86,5): Error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false.
07:51:39:577
07:51:39:578 32>Build failed. Check the Output window for more details.
07:51:39:774 ========== Build: 31 succeeded, 0 failed, 69 up-to-date, 0 skipped ==========
07:51:39:774 ========== Build started at 7:48 AM and took 03:31.081 minutes ==========
07:51:39:777 ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========
07:51:39:777 ========== Publish started at 7:48 AM and took 03:31.084 minutes ==========

@vitek-karas
Copy link
Member

This looks very similar to #3072. That issue has been fixed in more recent release than the one you're using. Could you please try to upgrade to the latest .NET 7 SDK (currently 7.0.302)?

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

2 participants