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
fix: Trimming of CommunicationToast constructor when publishing #4068
Locally when running in debug or production mode, using the CommunicationToast is working completely fine, however after deploying to our IIS machine it does not work anymore. It looks like the constructor is being trimmed from the assembly. We have for now disabled trimming which resolved the issue, but ideally we would love to have it on. Tried several approaches to workaround but each was giving other errors.
Pre workaround:
With a workaround (dummy CommunicationToast in own assembly):
💻 Repro or Code Sample
I'm finding it hard to reproduce, publishing locally does not seem to have the same error, but I am working on a MAC compared to the IIS windows deployment. Maybe that could be the culprit between the 2?
Browser Tried both Chrome and Safari, both not working
.NET 9.0.8 and Fluent UI 4.12.1
It is worth noting that we are providing the Fluent UI packages to our projects through our own (internal) packages, could it possibly have anything to do with that?
I wonder if [method: DynamicDependency(DynamicallyAccessedMemberTypes.PublicConstructors, typeof(CommunicationToast))] preserves primary constructors for DynamicComponent to use.
This could potentially be fixed with the 4.12.2 prerelease package, but i am unable to pull this package into our deployed environment, so i can't test it :(. I can start testing once 4.12.2 is released completely to see if that solves it.
With PR mentioned, I've changed DynamicDependency from using DynamicallyAccessedMemberTypes.PublicConstructors to DynamicallyAccessedMemberTypes.All (in line with usage in rest of the code base).
Tyme-Bleyaert for Toasts we are not using DynamicComponent. Happy to hear any other input you might have... Pascal Vorwerk (@PascalVorwerk) Once this PR is in, you can perhaps try a local build with the preview package?
Vincent Baaij (@vnbaaij) Hope you had a nice holiday 😄 . Sadly, in our internal builds, there is select list of packages i can pull and for some reason i can't replicate it locally on my own machine.. I will ask if the nuget package can be added to the internal nuget repository, but I am not sure if it will be allowed.
If not, i will communicate my findings once we build with the full release itself!
Activity
DanielCordell commentedon Aug 13, 2025
We have the same issue, using net8 but same FluentUI version.
Tyme-Bleyaert commentedon Aug 14, 2025
I wonder if
[method: DynamicDependency(DynamicallyAccessedMemberTypes.PublicConstructors, typeof(CommunicationToast))]preserves primary constructors forDynamicComponentto use.PascalVorwerk commentedon Aug 14, 2025
This could potentially be fixed with the 4.12.2 prerelease package, but i am unable to pull this package into our deployed environment, so i can't test it :(. I can start testing once 4.12.2 is released completely to see if that solves it.
vnbaaij commentedon Sep 2, 2025
With PR mentioned, I've changed
DynamicDependencyfrom usingDynamicallyAccessedMemberTypes.PublicConstructorstoDynamicallyAccessedMemberTypes.All(in line with usage in rest of the code base).Tyme-Bleyaert for Toasts we are not using
DynamicComponent. Happy to hear any other input you might have...Pascal Vorwerk (@PascalVorwerk) Once this PR is in, you can perhaps try a local build with the preview package?
PascalVorwerk commentedon Sep 2, 2025
Vincent Baaij (@vnbaaij) Hope you had a nice holiday 😄 . Sadly, in our internal builds, there is select list of packages i can pull and for some reason i can't replicate it locally on my own machine.. I will ask if the nuget package can be added to the internal nuget repository, but I am not sure if it will be allowed.
If not, i will communicate my findings once we build with the full release itself!