-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-Diagnostics-coreclrlinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework
Milestone
Description
With the recent debugger feature switch linker is now tasked to remove some attributes which are related to the debugger. Linker will do that for all attribute instantiations, but if there's code which refers to the removed attribute's type directly, linker will generate a warning since it's likely the behavior of that code will change.
Currently this produces 4 warnings in CoreLib:
ILLink: warning IL2045: System.Diagnostics.StackTrace.ToString(StackTrace.TraceFormat,StringBuilder): Custom Attribute System.Runtime.CompilerServices.CompilerGeneratedAttribute is being referenced in code but the linker was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the linker attribute XML portion which removes the attribute instances, or to override this use the linker XML descriptor to keep the attribute type (which in turn keeps all of its instances).
ILLink: warning IL2045: System.Diagnostics.StackTrace.ShowInStackTrace(MethodBase): Custom Attribute System.Diagnostics.StackTraceHiddenAttribute is being referenced in code but the linker was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the linker attribute XML portion which removes the attribute instances, or to override this use the linker XML descriptor to keep the attribute type (which in turn keeps all of its instances).
ILLink: warning IL2045: System.Diagnostics.StackTrace.ShowInStackTrace(MethodBase): Custom Attribute System.Diagnostics.StackTraceHiddenAttribute is being referenced in code but the linker was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the linker attribute XML portion which removes the attribute instances, or to override this use the linker XML descriptor to keep the attribute type (which in turn keeps all of its instances).
ILLink: warning IL2045: System.Diagnostics.Tracing.Statics.CreateDefaultTypeInfo(Type,List<Type>): Custom Attribute System.Runtime.CompilerServices.CompilerGeneratedAttribute is being referenced in code but the linker was instructed to remove all instances of this attribute. If the attribute instances are necessary make sure to either remove the linker attribute XML portion which removes the attribute instances, or to override this use the linker XML descriptor to keep the attribute type (which in turn keeps all of its instances).We should either suppress these warnings or wrap the code which does this with the respective feature switch so that it gets removed.
Metadata
Metadata
Assignees
Labels
area-Diagnostics-coreclrlinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework