Visit NES for .NET Home Page

NES for System.IO.Hashing and System.Memory.Data

How to restore System.IO.Hashing and System.Memory.Data for .NET 8 from the NES NuGet feed.

System.IO.Hashing and System.Memory.Data are Microsoft libraries that ship from the .NET runtime repository. Microsoft stopped releasing new .NET 8 versions of both, so the last ones are System.IO.Hashing 8.0.0 and System.Memory.Data 8.0.1. Most apps get them through another package: System.Memory.Data comes in with the Azure SDK, and System.IO.Hashing with libraries that use its CRC and xxHash implementations.

NES covers both as part of .NET 8 Essentials:

PackageVersion
System.IO.Hashing8.0.0
System.Memory.Data8.0.1

These are Microsoft's packages, republished on the NES feed without changes. Each one is byte-for-byte identical to the copy on nuget.org and keeps Microsoft's signature. If either package needs a fix, NES will publish a patched build on the same feed with a version number that differs from Microsoft's.

Minimum Requirements

Please review our Minimum Requirements to ensure a smooth installation. You also need an access token with the .NET 8: Essentials product. Then follow 3 easy steps:

  1. Add the NES feed
  2. Install the packages
  3. Restore and check the source

Detailed Instructions

Add the NES feed

Create a nuget.config next to your solution file, or add these entries to the one you already have. Replace <NES_ACCESS_TOKEN> with your access token.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="nesnet" value="https://registry.nes.herodevs.com/nuget/v3/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <nesnet>
      <add key="Username" value="artifactory" />
      <add key="ClearTextPassword" value="<NES_ACCESS_TOKEN>" />
    </nesnet>
  </packageSourceCredentials>
  <packageSourceMapping>
    <packageSource key="nesnet">
      <package pattern="System.IO.Hashing" />
      <package pattern="System.Memory.Data" />
    </packageSource>
    <packageSource key="nuget.org">
      <package pattern="*" />
    </packageSource>
  </packageSourceMapping>
</configuration>

The packageSourceMapping block sends both packages to the NES feed only. Without it, NuGet can take them from nuget.org instead, and because the version numbers match, nothing in your build would show which feed they came from.

Install the packages

If your project references either package directly:

dotnet add package System.IO.Hashing --version 8.0.0
dotnet add package System.Memory.Data --version 8.0.1

If they only come in through another package, you don't need to add anything, as long as that package accepts these versions. Recent Azure SDK releases (Azure.Core 1.51 and later) need System.Memory.Data 10.x, which Microsoft still supports. For those, leave System.Memory.Data out of the mapping and let it restore from nuget.org.

Restore and check the source

NuGet reuses a package already in your local cache, whichever feed it came from. Clear the cache before the first restore so both packages are downloaded from the NES feed:

dotnet nuget locals all --clear
dotnet restore

To confirm where a package came from, look at the .nupkg.metadata file NuGet writes next to it in the global packages folder:

cat ~/.nuget/packages/system.io.hashing/8.0.0/.nupkg.metadata

On Windows the folder is %USERPROFILE%\.nuget\packages. The source line should point at https://registry.nes.herodevs.com/nuget/v3/index.json.

If restore fails with NU1101 for either package, check the access token in nuget.config, and check that your subscription includes .NET 8: Essentials.

If restore fails with NU1102 for System.Memory.Data, another package needs a newer version than 8.0.1. Remove System.Memory.Data from the nesnet mapping.

Additional Information

Direct Download URLs

The direct download URLs for NES for System.IO.Hashing and System.Memory.Data are:

PackageVersionURL
System.IO.Hashing8.0.0Download
PackageVersionURL
System.Memory.Data8.0.1Download