C
C#7mo ago
cypherpotato

✅ Disable trimming for certain assemblies

Hello. There's a way to disable code trimming for certain assemblies? I just want to AOT-Compile my application, but trim only CLR assemblies and not the principal assembly. My code does use a lot of dynamic code, so it would be trimmed on an AOT-compilation. Thank you.
4 Replies
cypherpotato
cypherpotatoOP7mo ago
Well I think i got it working with
<ItemGroup>
<TrimmerRootAssembly Include="MyAssembly" />
</ItemGroup>
<ItemGroup>
<TrimmerRootAssembly Include="MyAssembly" />
</ItemGroup>
reflectronic
reflectronic7mo ago
you can use <TrimMode>partial</TrimMode> to disable trimming for all assemblies which are not marked as trimmable it might be easier than going through and testing and rooting each further assembly which does not work
cypherpotato
cypherpotatoOP7mo ago
but will it work for AOT compilation?
Want results from more Discord servers?
Add your server