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

Linker error in InputNumber #111160

Open
1 task done
AbstractionsAs opened this issue Jan 7, 2025 · 1 comment
Open
1 task done

Linker error in InputNumber #111160

AbstractionsAs opened this issue Jan 7, 2025 · 1 comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers untriaged New issue has not been triaged by the area owner

Comments

@AbstractionsAs
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When bulding for release, the linker will sometimes remove the setter for the property "ParsingErrorMessage", resulting in an error stating that the "InputNumber"-component declares a property that is not public.

This can be "resolved" by adding the folloing method to Program.cs, forcing the linker to not remove the setter:

  public static void LinkerFix(InputNumber<int> inputNumber)
  {
      inputNumber.ParsingErrorMessage = "Invalid number";
  }

Expected Behavior

The linker should never remove this setter.

Steps To Reproduce

This is difficult, but it happens in our relase builds

Exceptions (if any)

InvalidOperationException, stating the the InputNumber component declares a parameter matching the name "ParsingErrorMessage" that is not public.

.NET Version

9

Anything else?

No response

@javiercn javiercn transferred this issue from dotnet/aspnetcore Jan 7, 2025
@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 7, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 7, 2025
@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 7, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/illink
See info in area-owners.md if you want to be subscribed.

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

2 participants