Burst error BC1091, I don't know how to fix it

I’ve been getting this error everytime I open my unity project, i tried googling it, i found similar errors, but no solution. The game runs fine, despite the error popping up, but it is quite annoying that i can’t figure out why it randomly started appearing.
It’s all mumbo jumbo to me, but if it helps, here’s the full error i get:

(0,0): Burst error BC1091: External and internal calls are not allowed inside static constructors: Interop.BCrypt.BCryptGenRandom(System.IntPtr hAlgorithm, byte* pbBuffer, int cbBuffer, int dwFlags)

at Interop.GetRandomBytes(byte* buffer, int length)
at System.HashCode.GenerateGlobalSeed()
at System.HashCode..cctor()
at System.HashCode.MixEmptyState()
at System.HashCode.Combine(int value1, ulong value2)
at Unity.MemoryProfiler.Editor.PartialCallstackSymbolsRef1<System.UInt64>.BuildHashCode(ref Unity.MemoryProfiler.Editor.Containers.DynamicArrayRef1 callstackRef, long depth, bool inverted) (at .\Library\PackageCache\com.unity.memoryprofiler@1.1.9\Editor\Utilities\CallstacksUtility.cs:70)

While compiling job:
Unity.MemoryProfiler.Editor.PartialCallstackSymbolsRef1[[System.UInt64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], Unity.MemoryProfiler.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::BuildHashCode(Unity.MemoryProfiler.Editor.Containers.DynamicArrayRef1[[System.UInt64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]&, Unity.MemoryProfiler.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
Unity.Jobs.IJobExtensions+JobStruct1[[Unity.MemoryProfiler.Editor.Containers.CollectionsCompatibility.LowLevel.Unsafe.UnsafeDisposeJob, Unity.MemoryProfiler.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Unity.MemoryProfiler.Editor.Containers.CollectionsCompatibility.LowLevel.Unsafe.UnsafeDisposeJob&, Unity.MemoryProfiler.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) Unity.Jobs.IJobExtensions+JobStruct1[[Unity.MemoryProfiler.Editor.Containers.CollectionsCompatibility.NativeHashMapDisposeJob, Unity.MemoryProfiler.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null::Execute(Unity.MemoryProfiler.Editor.Containers.CollectionsCompatibility.NativeHashMapDisposeJob&, Unity.MemoryProfiler.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|System.IntPtr, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089|Unity.Jobs.LowLevel.Unsafe.JobRanges&, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null|System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)

Any solutions? thanks!!

You should add more information to help people diagnoses your issue:

  • Full Unity version
  • Your current manifest.json and packages-lock.json inside Packages folder

It would be better if you can reproduce the issue on blank project and put a link here so people can examine it.

The error you are seeing is issued by older versions of Burst when compiling HashCode.Combine. Upgrading Burst should resolve the issue. However, be aware that HashCode.Combine will yield a different result between Burst and managed code.

The error is in editor-only code and the game will run fine, because it is falling back to the managed version. It does not affect player builds.