From 32e1eb4bcc31ce2e5a254f359cd009b10ed8e8bc Mon Sep 17 00:00:00 2001 From: gord5500 <90227099+gord5500@users.noreply.github.com> Date: Tue, 2 May 2023 10:25:22 -0400 Subject: [PATCH] Set partial trimming (#265) ### Why The published build of bmx right now will crash with the error `No parameterless constructor defined for type 'Amazon.Util.Internal.PlatformServices.NetworkReachability'` https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trim-self-contained When building bmx with aot, we reduce the deployment size by getting rid of unused parts of libraries. Theres a [problem ](https://github.com/aws/aws-sdk-net/issues/2531) though with the aws sdk right now where it gets rid of some parts we actually need. I think it's to do with [this](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/incompatibilities#dynamic-assembly-loading-and-execution) ### How The github issue page mentioned a temporary solution to set the trim mode to partial for now. The build size would be 17.5MB compared to 13 so it seems like not a big issue? --- src/D2L.Bmx/D2L.Bmx.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/D2L.Bmx/D2L.Bmx.csproj b/src/D2L.Bmx/D2L.Bmx.csproj index b02c8216..5149736b 100644 --- a/src/D2L.Bmx/D2L.Bmx.csproj +++ b/src/D2L.Bmx/D2L.Bmx.csproj @@ -1,4 +1,4 @@ - + bmx @@ -8,6 +8,7 @@ enable enable nullable + partial