'System.TypeLoadException' occurred in Microsoft.Extensions.FileProviders.Physical.dll
Description
Updated SDK 8.0.100-preview.4 to SDK 8.0.100-preview.5 to compile and run WPF application.
Expected: Compilation compiles and runs fine and expected the application to run just as it was with preview.4
Result: Compilation ok. At runtime (location not determined precisely) application throws:
An unhandled exception of type 'System.TypeLoadException' occurred in Microsoft.Extensions.FileProviders.Physical.dll
Could not load type 'System.Buffers.IndexOfAnyValues`1' from assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Configuration
SDK: 8.0.100-preview.5.23303.2
Runtime Environment: OS Name: Windows OS Version: 10.0.19045 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100-preview.4.23260.5\
Other information
Regression and working SDK
.NET workloads installed: Version: 8.0.0-preview.4.23259.5 Architecture: x64 Commit: 84a3d0e37e
This error means that you are using some preview 4 packages and running on preview 5 runtime. Please update all your nuget packages to preview 5 as well and fully recompile your application.
Mixing and matching components from different preview versions is not supported.
Duplicate of https://github.com/dotnet/runtime/issues/88045