Edit

MSB3822 diagnostic code

This article describes the MSB3822 error code.

Message text

MSB3822: Non-string resources require the System.Resources.Extensions assembly at runtime, but it was not found in this project's references.

Description

This error occurs when the project file opts into embedding resources by using the new System.Resources.Extensions mechanism. This mechanism isn't compatible with older .NET Framework project types unless the System.Resources.Extensions.dll library is available at runtime.

Resolution

To resolve this issue, you can reference the System.Resources.Extensions package, or use the default resource-embedding process (don't specify the GenerateResourceUsePreserializedResources option).

When you run on .NET Core or .NET 5.0 or higher, MSBuild supports only the new resource-embedding technique. If you want to use the old default process, you must build with MSBuild.exe or Visual Studio and can't use the dotnet build command.

Applies to

All versions of MSBuild