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

IL Trimmer has encountered an unexpected error #111089

Open
Nick-Blair19 opened this issue Jan 4, 2025 · 4 comments
Open

IL Trimmer has encountered an unexpected error #111089

Nick-Blair19 opened this issue Jan 4, 2025 · 4 comments
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers untriaged New issue has not been triaged by the area owner

Comments

@Nick-Blair19
Copy link

Description

Error in my net 8 net maui project was: IL Trimmer has encountered an unexpected error. Please report the issue at https://aka.ms/report-illink

Please can you help?
Regards nick hunter-blair

Reproduction Steps

Image [bleplugin tme-5.zip](https://github.com/user-attachments/files/18307433/bleplugin.tme-5.zip)

Expected behavior

I have no idea why this is happening

Actual behavior

This happened when I updated visual studio community edition

Regression?

Think I had visual studio community edition 17.12.2 when it worked. Something like that. I now have 17.13.0 preview 2.1

Known Workarounds

No response

Configuration

Net 8.0. Mac ios 15.2. ipad ios 17.7.1

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 4, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 4, 2025
@Nick-Blair19
Copy link
Author

Here is the code in Xamarin Shared Targets

<Xamarin.MacDev.Tasks.ILLink
SessionId="$(BuildSessionId)"
AssemblyPaths="@(ManagedAssemblyToLink)"
ReferenceAssemblyPaths="@(ReferencePath)"
RootAssemblyNames="@(TrimmerRootAssembly)"
TrimMode="$(TrimMode)"
DefaultAction="$(_TrimmerDefaultAction)"
RemoveSymbols="$(TrimmerRemoveSymbols)"
FeatureSettings="@(_TrimmerFeatureSettings)"
CustomData="@(_TrimmerCustomData)"

	BeforeFieldInit="$(_TrimmerBeforeFieldInit)"
	OverrideRemoval="$(_TrimmerOverrideRemoval)"
	UnreachableBodies="$(_TrimmerUnreachableBodies)"
	UnusedInterfaces="$(_TrimmerUnusedInterfaces)"
	IPConstProp="$(_TrimmerIPConstProp)"
	Sealer="$(_TrimmerSealer)"

	Warn="$(ILLinkWarningLevel)"
	NoWarn="$(NoWarn)"
	TreatWarningsAsErrors="$(ILLinkTreatWarningsAsErrors)"
	WarningsAsErrors="$(WarningsAsErrors)"
	WarningsNotAsErrors="$(WarningsNotAsErrors)"
	SingleWarn="$(TrimmerSingleWarn)"

	CustomSteps="@(_TrimmerCustomSteps)"
	RootDescriptorFiles="@(TrimmerRootDescriptor)"
	OutputDirectory="$(IntermediateLinkDir)"
	DumpDependencies="$(_TrimmerDumpDependencies)"
	DependenciesFileFormat="$(_TrimmerDependenciesFileFormat)"
	ExtraArgs="$(_RemoteExtraTrimmerArgs)"
	ToolExe="$(_DotNetHostFileName)"
	ToolPath="$(_DotNetHostDirectory)"
	ILLinkPath="$(_RemoteILLinkPath)"
	LinkerItemsDirectory="$(_LinkerItemsDirectory)"
	DebugSymbols="@(_ILLinkDebugSymbols)"
	ContinueOnError="ErrorAndContinue">
<Output TaskParameter="ExitCode" PropertyName="_ILLinkExitCode" />
<Output TaskParameter="LinkedItems" ItemName="_XamarinLinkedItems" />
<Output TaskParameter="LinkerOutputItems" ItemName="_XamarinLinkerItems" />

</Xamarin.MacDev.Tasks.ILLink>

@Nick-Blair19
Copy link
Author

Sorry it was in Xamarin.Ios.Common.After.Targets

Dont worry when I removed the windows target the error disappeared. Would still like it to work with windows 11 though

@jkotas jkotas added area-Tools-ILLink .NET linker development as well as trimming analyzers and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jan 4, 2025
@jkotas jkotas changed the title [area-Tools-ILLink]: IL Trimmer has encountered an unexpected error Jan 4, 2025
@vitek-karas
Copy link
Member

I tried to repro this using your project but I don't see the failure. I didn't try building for iPad from VS, but publishing on the mac works just fine it seems.

Could you please provide more details:

  • What version of .NET SDK you have
  • What is the full error - there should be a callstack from the illink cool. You might need to capture msbuild binlog to get it though
  • Did you try to build/publish this project on a mac directly?

@vitek-karas vitek-karas added the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 7, 2025
@Nick-Blair19
Copy link
Author

Nick-Blair19 commented Jan 7, 2025 via email

@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers untriaged New issue has not been triaged by the area owner
Projects
Status: No status
Development

No branches or pull requests

3 participants