'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.

Class library usage, coding and language questions.
GeorgeKurta
Posts: 6
Joined: Fri Mar 15, 2024 1:04 pm

'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.

Post by GeorgeKurta » Tue Mar 19, 2024 8:22 am

Trying to run my tests.

I get this error:

Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.


My App config looks like this

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="4.0.6.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
</assemblyBinding>
<enforceFIPSPolicy enabled="false" />
</runtime>
</configuration>



I have the right reference, I just added it from my computer.

I don't get it.

GeorgeKurta
Posts: 6
Joined: Fri Mar 15, 2024 1:04 pm

Re: 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.

Post by GeorgeKurta » Wed Mar 27, 2024 9:45 am

Solved. In dependency the version was lower, it was not showing it LOL. So I had to guess and change to all version until I had the same in dependency and in reference. Everything is worse and harder then it should be using ranorex.