System.TypeInitializationException Exception

NALB 71 Reputation points
2023-02-09T10:50:18.58+00:00

Hello ,

After I have added my dot net project on remote Linux server and I am trying to debug it from my local windows .. it returns in the output that it cannot find the (.pdb) . to solve that I have Configured the location of symbol files but I revived the below error when I run dotnet build on the remote Linux Server ,can some one help me solve it ?


System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.Cli.Parser' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.Cli.AddCommandParser' threw an exception.
 ---> System.IO.FileNotFoundException: Unable to find the specified file.
   at Interop.Sys.GetCwdHelper(Byte* ptr, Int32 bufferSize)
   at Interop.Sys.GetCwd()
   at System.IO.Directory.GetCurrentDirectory()
   at Microsoft.DotNet.Cli.CommonOptions.DefaultToCurrentDirectory[T](Argument`1 arg)
   at Microsoft.DotNet.Cli.AddCommandParser..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.Cli.Parser..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
Developer technologies C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.