You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1 #179
Application: csc.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileLoadException
at System.MemoryExtensions.AsSpan(System.String)
at Roslyn.Utilities.CommandLineUtilities.SplitCommandLineIntoArguments(System.String, Boolean, System.Nullable1<Char> ByRef) at Microsoft.CodeAnalysis.CommandLine.BuildClient.GetCommandLineWindows(System.Collections.Generic.IEnumerable1<System.String>)
at Microsoft.CodeAnalysis.CommandLine.BuildClient.Run(System.Collections.Generic.IEnumerable`1<System.String>, Microsoft.CodeAnalysis.CommandLine.RequestLanguage, Microsoft.CodeAnalysis.CommandLine.CompileFunc, Microsoft.CodeAnalysis.CommandLine.CompileOnServerFunc)
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(System.String[])
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(System.String[])
When i try to run the csc.exe as admin in a command prompt i get:
PS C:\xyz\xyz\bin\roslyn> .\csc.exe
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, 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)
at System.MemoryExtensions.AsSpan(String text)
at Roslyn.Utilities.CommandLineUtilities.SplitCommandLineIntoArguments(String commandLine, Boolean removeHashComments, Nullable1& illegalChar) at Microsoft.CodeAnalysis.CommandLine.BuildClient.GetCommandLineWindows(IEnumerable1 args)
at Microsoft.CodeAnalysis.CommandLine.BuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, CompileOnServerFunc compileOnServerFunc)
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(String[] args)
at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(String[] args)
The provided System.Runtime.CompilerServices.Unsafe.dll in the bin\roslyn folder is version 5.0.20.51904.
I wonder why System.Runtime.CompilerServices.Unsafe.dll is not version 4.0.4.1.
Have any one else seen this issue or can help me fixing it?
Activity