Introduction
When building applications with the AWS SDK for .NET, developers sometimes need additional packages to support specific AWS features. One example is the AWS Common Runtime (CRT), which provides native libraries and implementations for operations such as request signing and checksum calculation.
In earlier versions of the AWS SDK for .NET, certain features depended on CRT because the .NET platform did not provide the required implementations through the SDK's existing managed code. Developers who needed these features had to install an additional NuGet package called AWSSDK.Extensions.CrtIntegration.
AWS SDK for .NET 4.1 changes this dependency model. It introduces managed implementations for functionality that previously required CRT, allowing applications to remove the CRT integration package when they use the corresponding SDK functionality through version 4.1.
This change can simplify application deployment, reduce unnecessary native dependencies, and make package management easier. However, removing a package without checking how the application uses it can introduce problems, especially when other components still depend on CRT.
In this article, we will understand why the AWS SDK previously required CRT, what changed in version 4.1, and how to remove the dependency safely from a C# application.
What Is AWS Common Runtime?
AWS Common Runtime is a collection of libraries designed to provide common networking, security, and performance-related functionality for AWS SDKs and applications.
It includes components that support operations such as HTTP communication, cryptographic functionality, and other low-level tasks.
The AWS SDK for .NET previously used native CRT bindings for certain features that did not have the required managed implementation within the SDK.
Two important examples were:
SigV4a signing, which is used by features such as Amazon S3 Multi-Region Access Points.
CRC64NVME checksums, which are used for data integrity operations involving Amazon S3 objects.
To enable these capabilities, developers needed the AWSSDK.Extensions.CrtIntegration package.
The dependency was optional because not every application needed these features. Applications that used the relevant functionality without installing CRT could receive runtime exceptions indicating that the required implementation was unavailable.
Why AWS SDK for .NET 4.1 Removes the CRT Requirement
AWS SDK for .NET 4.1 introduces managed implementations for the functionality that previously depended on CRT.
There are two important changes.
Managed SigV4a implementation
SigV4a is an AWS Signature Version 4 signing mechanism that supports requests involving multiple AWS regions.
For example, Amazon S3 Multi-Region Access Points allow applications to access data through a global endpoint that can route requests across multiple AWS Regions.
Earlier SDK versions used CRT to provide the SigV4a signing implementation. In version 4.1, the managed implementation is included in the AWSSDK.Core package.
This means supported SigV4a operations no longer require the separate CRT integration package.
Checksum support through System.IO.Hashing
Checksums help applications verify that data has not been corrupted during transfer or storage.
The AWS SDK uses checksum algorithms for operations such as uploading objects to Amazon S3.
Previously, some checksum functionality, including CRC64NVME, depended on CRT. AWS SDK for .NET 4.1 uses System.IO.Hashing for checksum operations across its supported targets.
The .NET 11 release also includes CRC64NVME support in System.IO.Hashing, completing the move away from CRT for this SDK functionality.
The SDK manages the required checksum implementation internally. Application code generally does not need to calculate these checksums manually.
Understanding the Old Dependency Structure
Consider an application that uses Amazon S3 and requires multi-region access point support.
With an earlier AWS SDK version, its project file might contain the following package references:
<ItemGroup>
<PackageReference Include="AWSSDK.S3"
Version="4.0.0.0" />
<PackageReference Include="AWSSDK.Extensions.CrtIntegration"
Version="4.0.0.0" />
</ItemGroup>
The S3 package provides the service client, while the CRT integration package supplies the additional native implementation required by certain operations.
If the application uses SigV4a functionality without the required integration, it can encounter a runtime exception similar to this:
Attempting to make a request that requires an implementation
of AWS Signature V4a.
Add a reference to the AWSSDK.Extensions.CrtIntegration
NuGet package to your project to include the AWS Signature
V4a signer.
This error indicates that the SDK cannot find the required signing implementation.
It is important to understand that the problem is not necessarily related to AWS credentials, IAM permissions, or network connectivity. The required implementation may simply be missing from the application.
Updating the AWS SDK to Version 4.1
Before removing the CRT dependency, update the AWS SDK packages to version 4.1.
For example, if the application uses Amazon S3, update the package using:
dotnet add package AWSSDK.S3 --version 4.1.0
If the application uses additional AWS services, review and update their corresponding SDK packages as well.
You should also check the target framework. Version 4.1 includes builds for .NET 11, .NET 10, .NET 8, .NET Standard 2.0, and .NET Framework 4.7.2.
The .NET Core 3.1 target has been removed. Applications targeting .NET Core 3.1 or .NET 5, 6, or 7 should be moved to a supported .NET version rather than relying on the fallback .NET Standard 2.0 build.
The SDK can still compile against the fallback target, but some target-specific features and optimizations will not be available.
Removing AWSSDK.Extensions.CrtIntegration
After updating the SDK packages, remove the CRT integration package.
Use the following command:
dotnet remove package AWSSDK.Extensions.CrtIntegration
If the project uses Central Package Management, remove the package reference from the Directory.Packages.props file instead.
For example, the old configuration may look like this:
<Project>
<ItemGroup>
<PackageVersion Include="AWSSDK.S3"
Version="4.1.0" />
<PackageVersion Include="AWSSDK.Extensions.CrtIntegration"
Version="4.0.0.0" />
</ItemGroup>
</Project>
After removing the CRT package, the configuration becomes:
<Project>
<ItemGroup>
<PackageVersion Include="AWSSDK.S3"
Version="4.1.0" />
</ItemGroup>
</Project>
If the package is referenced directly by multiple projects in a solution, remove it from each project that no longer needs it.
Do not manually remove native DLLs or shared libraries from deployment folders before checking the dependency graph. Let NuGet restore the updated package dependencies and rebuild the application.
Checking the Updated Package Dependencies
Removing a package reference from the project file does not automatically prove that the application no longer contains CRT-related dependencies.
Another package or project may still reference the same dependency.
Use the following command to inspect the restored dependency graph:
dotnet list package --include-transitive
Review the output and check whether AWSSDK.Extensions.CrtIntegration is still included.
For projects using a newer .NET SDK, you can also inspect the generated dependency information in the obj/project.assets.json file.
For example, search the dependency output for:
AWSSDK.Extensions.CrtIntegration
If the package is still present, identify which direct or transitive dependency is bringing it into the project.
Do not remove another package simply because it appears related to CRT. First determine whether it is required by a separate integration or application component.
After reviewing the dependencies, restore and build the solution:
dotnet restore
dotnet build --configuration Release
This helps identify missing references, incompatible package versions, and other upgrade issues before deployment.
Testing Amazon S3 Features After Removing CRT
Package removal is not complete until the application has been tested.
Consider an application that uploads files to Amazon S3 and uses a multi-region access point.
The following example creates an S3 client and uploads an object using the normal AWS SDK API.
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
var s3Client = new AmazonS3Client(
RegionEndpoint.USEast1);
var request = new PutObjectRequest
{
BucketName = "my-application-bucket",
Key = "uploads/sample.txt",
ContentBody = "Testing AWS SDK for .NET 4.1"
};
PutObjectResponse response =
await s3Client.PutObjectAsync(request);
Console.WriteLine(
$"Upload completed. Status: {response.HttpStatusCode}");
The application continues using the standard S3 client. The managed checksum implementation is handled internally by the SDK where applicable.
For applications that use SigV4a, add a separate integration test that exercises the actual multi-region access point configuration. A normal regional S3 upload does not prove that SigV4a signing works.
Testing should cover the operations that previously required CRT, rather than relying only on a successful compilation.
Verifying the Published Application
Applications may behave differently after deployment than they do during local development. This is particularly important when the previous dependency included native libraries.
Publish the application using:
dotnet publish -c Release -o ./publish
Then inspect the published output and its dependency information.
For example, check whether the deployment still contains native CRT libraries that were previously included through the integration package.
If they are still present, investigate whether another package or application component requires them.
You should also run the published application in an environment similar to production. Test the AWS operations that previously depended on CRT and verify that credentials, permissions, network access, and service configuration are correct.
The goal is to confirm that removing the package has not affected application behavior, not simply to reduce the number of NuGet references.
Important Considerations During Migration
Check for direct CRT usage
The AWS SDK no longer requires CRT for the features replaced in version 4.1. However, your application may use AWS CRT libraries directly or through another integration.
If application code calls CRT APIs independently, removing the integration package may still break that functionality.
Review shared libraries
A class library may contain its own reference to AWSSDK.Extensions.CrtIntegration. Removing the package from the main application does not remove references from every project in the solution.
Review the dependency graph across all projects.
Check package version consistency
Keep the AWS service packages aligned with the intended SDK release. Avoid upgrading only one service package while leaving related dependencies on incompatible versions.
Test multi-region functionality
Applications using Amazon S3 Multi-Region Access Points or other SigV4a-dependent operations should receive dedicated integration testing.
Review deployment pipelines
If your deployment process copies native libraries, installs additional runtime components, or uses custom packaging scripts, review those steps after removing CRT.
Keep rollback available
For production applications, keep a known working package configuration and deployment artifact until the updated application has passed its integration tests.
Common Mistakes to Avoid
One common mistake is removing AWSSDK.Extensions.CrtIntegration before upgrading the SDK to version 4.1. Earlier versions still require CRT for certain features, so this can cause runtime failures.
Another mistake is assuming that every AWS service operation uses SigV4a. Most ordinary regional AWS requests continue using their normal signing behavior. The managed SigV4a implementation matters only for operations that require that signing algorithm.
Developers may also remove the package from the main application while forgetting that another project references it. This can leave unnecessary dependencies in the final deployment.
Finally, checking only whether the application builds is not enough. Runtime tests are necessary because signing and checksum implementations are exercised when actual AWS operations are performed.
Advantages and Disadvantages
Advantages
Removes the AWS CRT integration requirement for supported SDK functionality.
Simplifies NuGet dependency management.
Reduces reliance on native libraries for the affected features.
Provides a managed SigV4a implementation in AWSSDK.Core.
Uses System.IO.Hashing for checksum operations.
Makes application deployment easier when no other component needs CRT.
Disadvantages
Applications must upgrade to AWS SDK for .NET 4.1 to benefit from the change.
Existing projects may need target framework updates.
Direct CRT usage outside the SDK still needs separate consideration.
Integration testing is necessary for multi-region signing and checksum operations.
Other packages may continue introducing CRT-related dependencies.
Summary
AWS SDK for .NET 4.1 simplifies dependency management by removing the need for AWS Common Runtime for functionality that previously depended on it.
The managed SigV4a implementation is now included in AWSSDK.Core, while checksum operations use System.IO.Hashing. This allows applications to remove the AWSSDK.Extensions.CrtIntegration package when they rely on the SDK's supported implementations.
The migration is straightforward: update the AWS SDK packages, remove the CRT integration reference, restore dependencies, inspect the package graph, and test the affected AWS operations.
However, package removal should always be based on actual dependency usage. If another part of the application uses CRT directly, that dependency may still be required.
By checking both the build and runtime behavior, developers can simplify their AWS application dependencies without introducing unexpected deployment problems.
Join the conversation! Your thoughts help the community grow.