Closed Lapiniot closed 3 months ago
There are no obvious errors in the log that can shed light on the issue directly. However, after some experimentation with trimming configuration it become clear that issue is caused by some dynamic code trimmed off from one of the .NET standard libraries. So we essentially have two options:
It appeared after some trials that following assemblies should be skipped from trimming:
How to quickly narrow down the list of "victims":
\
partial\
in the Directory.Build.props
dotnet publish -c Release -p:PublishTrimmed=true -p:SelfContained=true
printf '\
\n' *.dll
in the publish directory to get pre-formated list of all dependencies kept by linker
Blazor interactive rendering doesn't work anymore when application is published with trimming enabled. Client requests reach server app, but UI fragments are not updated in response. Browser logs contain following: