Open
Description
I was surprised the default Blazor WASM template depends on Reflection.Emit. This is because of System.Linq.Expressions.
System.Linq.Expressions can be compiled in a way that removes the Ref.Emit dependency (use interpreter only) - to do this set the IsInterpreting
property in System.Linq.Expressions.csproj to true
.
Compiling without Ref.Emit support saves 112 kB uncompressed and 44 kB compressed on System.Linq.Expressions.dll alone. I expect there will be more savings possible in CoreLib (the Ref.Emit implementation).
#38438 fixes some bitrot in System.Linq.Expressions that is necessary to build this way.