I've spent 2 days on this error when trying to use Unity with Visual Studio Code as the IDE.
I tried installing various versions of DotNet SDK, Core, Visual Studio, The C# Plugin, nothing worked.
System.IO.FileLoadException: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.SpanHelpers.SequenceEqual(Byte& first, Byte& second, NUInt length)
at Microsoft.Extensions.DependencyModel.DependencyContextJsonReader.ReadToEnd(Stream stream)
at Microsoft.Extensions.DependencyModel.DependencyContextJsonReader.Read(Stream stream)
at Microsoft.Extensions.DependencyModel.DependencyContextLoader.LoadAssemblyContext(Assembly assembly, IDependencyContextReader reader)
at Microsoft.Extensions.DependencyModel.DependencyContextLoader.Load(Assembly assembly)
at Microsoft.Extensions.DependencyModel.DependencyContext.LoadDefault()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at OmniSharp.CompositionHostBuilder.DiscoverOmniSharpAssemblies() in D:\a\1\s\src\OmniSharp.Host\CompositionHostBuilder.cs:line 205
at OmniSharp.CompositionHostBuilder.WithOmniSharpAssemblies() in D:\a\1\s\src\OmniSharp.Host\CompositionHostBuilder.cs:line 179
at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.<Main>b__1() in D:\a\1\s\src\OmniSharp.Stdio.Driver\Program.cs:line 56
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass146_0.<OnExecute>b__0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<ExecuteAsync>d__157.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at OmniSharp.HostHelpers.Start(Func`1 action) in D:\a\1\s\src\OmniSharp.Host\HostHelpers.cs:line 29
=== Pre-bind state information ===
LOG: DisplayName = System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///c:/Users/shaun/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\Users\shaun\.vscode\extensions\ms-dotnettools.csharp-1.23.15\.omnisharp\1.37.15\OmniSharp.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80131040.

