Hello @flagrant99 ,
Welcome to Microsoft Q&A forum.
The error message does mention that "could not load file or assembly … The system cannot find the file specified". If you try to install the System.Runtime.CompilerServices.Unsafe.dll assembly(version 4.5.3 corresponding to assembly version 4.0.4.1, you can run ildasm
in Developer Command Prompt for Visual Studio and use ildasm tool to check the assembly version of the dll file) and register it into GAC, the error should disappear.
Please try to download the Nuget package from here: System.Runtime.CompilerServices.Unsafe. After downloading, you will get a .nupkg file, move it to a clean folder. Rename the file extension to .zip, open it, open the lib folder, open the net461 folder and you should see the dll file, copy the folder path, let’s say the path is C:\XXXX\XXXX.
Run Developer Command Prompt for Visual Studio as administrator, and run following commands:
cd C:\XXXX\XXXX
gacutil /i System.Runtime.CompilerServices.Unsafe.dll
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.