I am getting the below error while starting a windows service based on .net framework 5
System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0
I have tried the below methods. But it is not resolved
- Registered the System.Runtime.CompilerServices.Unsafe.dll into GAC
- Enabled "Auto-generate binding redirects" on the referenced project files