diff --git a/generator/.DevConfigs/c96f3a9d-eeff-4b56-9f52-353e52dad6cc.json b/generator/.DevConfigs/c96f3a9d-eeff-4b56-9f52-353e52dad6cc.json new file mode 100644 index 000000000000..964aeb5911fc --- /dev/null +++ b/generator/.DevConfigs/c96f3a9d-eeff-4b56-9f52-353e52dad6cc.json @@ -0,0 +1,9 @@ +{ + "core": { + "changeLogMessages": [ + "Fix #3173. Add DynamicallyAccessedMembers to ConstantClass in Net8 to remove trim warnings." + ], + "type": "patch", + "updateMinimum": true + } + } \ No newline at end of file diff --git a/sdk/src/Core/Amazon.Runtime/ConstantClass.cs b/sdk/src/Core/Amazon.Runtime/ConstantClass.cs index c4a86b1d8ce0..f0d0636bdac3 100644 --- a/sdk/src/Core/Amazon.Runtime/ConstantClass.cs +++ b/sdk/src/Core/Amazon.Runtime/ConstantClass.cs @@ -33,6 +33,9 @@ namespace Amazon.Runtime /// /// Base class for constant class that holds the value that will be sent to AWS for the static constants. /// +#if NET8_0_OR_GREATER + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] +#endif public class ConstantClass { static readonly object staticFieldsLock = new object();