Closed
Description
Description
I was following the guide at https://devblogs.microsoft.com/dotnet/creating-aot-compatible-libraries/ to make sure my library is AOT compatible. When I try to build and publish, the IlcCompile step never ends.
Reproduction Steps
Create a library project, add this type:
public readonly struct TypeBuilder<T1, T2>
{
public TypeBuilder<(T1, T2), T3> Add<T3>() => throw null;
}
Create an exe project like this:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<PublishAot>true</PublishAot>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<SelfContained>true</SelfContained>
<AnalysisLevel>latest-all</AnalysisLevel>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TypeBuilder\TypeBuilder.csproj" />
<TrimmerRootAssembly Include="TypeBuilder" />
</ItemGroup>
</Project>
Run dotnet publish -c Release -f net8.0
Expected behavior
Compilation ends.
Actual behavior
Compilation runs forever (I let it run for 1.5 hours before I killed it).
Regression?
No response
Known Workarounds
No response
Configuration
.Net 9.0.203
Windows 10
Ryzen 9800X3D
Other information
Consuming this library works just fine in normal projects, it seems to only be an issue with TrimmerRootAssembly
used to verify AOT compatibility.
Metadata
Metadata
Assignees
Type
Projects
Status
No status