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
If I understand it correctly, System.Transactions.Local is part of NetCoreAppLibrary property in src/libraries/NetCoreAppLibrary.props and it has IsTrimmable set to false now. Thus it survives trimming and brings itself and dependencies into every netcore app.
@roji why do we need IsTrimmable be set to false for System.Transactions.Local?
@radekdoulik with the porting of Windows-only distributed transaction support into System.Transactions.Local (#72051), this library now does COM interop, which is currently incompatible with trimming; so it was recommended to set IsTrimmable to false (see conversation here). It seems there's a desire to have a source generator for COM (in .NET 8.0), at which point we can mark the assembly as trimmable again...
Thanks for clarifying it. That should apply only for windows then, right? If so, we can make the property conditional to improve linking on other target platforms, like WebAssembly and mobile platforms. I opened #74828 for that.
Activity
AaronRobinsonMSFT commentedon Aug 24, 2022
@radekdoulik It is entirely possible something was missed to prune out the transaction code for WASM. Is there something that was missed?
/cc @roji
radekdoulik commentedon Aug 30, 2022
Not sure yet. It looks like something pulls in
System.Transactions.Localand few other assemblies.radekdoulik commentedon Aug 30, 2022
I think c55d76d#diff-197d1d73f09b5e9ce1e832442f7dccd63df0be0b7b8a47f6c682099ba84e5452R8 is the issue here.
If I understand it correctly,
System.Transactions.Localis part ofNetCoreAppLibraryproperty insrc/libraries/NetCoreAppLibrary.propsand it hasIsTrimmableset to false now. Thus it survives trimming and brings itself and dependencies into every netcore app.@roji why do we need
IsTrimmablebe set to false forSystem.Transactions.Local?roji commentedon Aug 30, 2022
@radekdoulik with the porting of Windows-only distributed transaction support into System.Transactions.Local (#72051), this library now does COM interop, which is currently incompatible with trimming; so it was recommended to set IsTrimmable to false (see conversation here). It seems there's a desire to have a source generator for COM (in .NET 8.0), at which point we can mark the assembly as trimmable again...
/cc @ajcvickers
jkotas commentedon Aug 30, 2022
You can do that for Windows only. It would fix the wasm regression.
Make System.Transactions.Local trimmable
radekdoulik commentedon Aug 30, 2022
Thanks for clarifying it. That should apply only for windows then, right? If so, we can make the property conditional to improve linking on other target platforms, like WebAssembly and mobile platforms. I opened #74828 for that.
roji commentedon Aug 30, 2022
Yep, makes sense.
Make System.Transactions.Local trimmable (#74828)
Make System.Transactions.Local trimmable
Make System.Transactions.Local trimmable (#75004)