```
Note that when you receive a trim warning, adding the class that generates the warning to `TrimmerRootAssembly` might not resolve the issue. A trim warning indicates that the class is trying to access some other class that can't be determined until runtime. To avoid runtime errors, add this second class to `TrimmerRootAssembly`.
To learn more about managing trim warnings, see [Introduction to trim warnings](https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/fixing-warnings) in the Microsoft .NET documentation.
## Troubleshooting
**Error: Cross-OS native compilation is not supported.**
Your version of the Amazon.Lambda.Tools .NET Core global tool is out of date. Update to the latest version and try again.
**Docker: image operating system "linux" cannot be used on this platform.**
Docker on your system is configured to use Windows containers. Swap to Linux containers to run the native AOT build environment.
For more information about common errors, see the [AWS NativeAOT for .NET](https://github.com/awslabs/dotnet-nativeaot-labs#common-errors) repository on GitHub.