You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Request: Tweak the ILC error output to improve diagnosability #118788
When turning on ILC's detailed error output (TrimmerSingleWarn=false), we get an output line per IL error which is great. But there's two tweaks I'd like to request:
Format the error output to align with MSBuild's error output.
Provide the originating assembly for errors like IL1005
When we get IL1005 the message is only the originating namespace and method, but not the assembly. Especially in cases like C#/WinRT which generate source into your assembly in the same namespace, this leaves me hunting around for which assembly is having the problem. E.g.:
ILC error IL1005: WinRT.AuthoringMetadataTypeInitializer.GetMetadataTypeMapping(Type): Method will always throw because: Failed to load type 'X' from assembly 'Y'
If we could just add the originating assembly here, that would help a lot:
ILC error IL1005: AssemblyZZZ!WinRT.AuthoringMetadataTypeInitializer.GetMetadataTypeMapping(Type): Method will always throw because: Failed to load type 'X' from assembly 'Y'
(0) looks weird. There are many error messages produced by established tools for Windows that do not have the line numbers. For example, link test.obj produces LINK : fatal error LNK1181: cannot open input file 'test.obj'. Can we use formatting like that?
Yes, it looks like if there's a space after the tool name that will work, so could we do:
ILC : error IL1005: AssemblyZZZ!WinRT.AuthoringMetadataTypeInitializer.GetMetadataTypeMapping(Type): Method will always throw because: Failed to load type 'X' from assembly 'Y'
Activity
dotnet-policy-service commentedon Aug 15, 2025
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.
jkotas commentedon Aug 15, 2025
(0)looks weird. There are many error messages produced by established tools for Windows that do not have the line numbers. For example,link test.objproducesLINK : fatal error LNK1181: cannot open input file 'test.obj'. Can we use formatting like that?jevansaks commentedon Aug 15, 2025
Yes, it looks like if there's a space after the tool name that will work, so could we do:
Tweaks to warning formatting