Skip to content

Commit

Permalink
Fix #3173 trim warning for constantclass.intern
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrsongg committed Sep 4, 2024
1 parent 391116f commit 039404b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"core": {
"changeLogMessages": [
"Fix #3173. Add DynamicallyAccessedMembers to ConstantClass in Net8 to remove trim warnings."
],
"type": "patch",
"updateMinimum": true
}
}
3 changes: 3 additions & 0 deletions sdk/src/Core/Amazon.Runtime/ConstantClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ namespace Amazon.Runtime
/// <summary>
/// Base class for constant class that holds the value that will be sent to AWS for the static constants.
/// </summary>
#if NET8_0_OR_GREATER
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)]
#endif
public class ConstantClass
{
static readonly object staticFieldsLock = new object();
Expand Down

0 comments on commit 039404b

Please sign in to comment.