waf / CSharpRepl

A command line C# REPL with syntax highlighting – explore the language, libraries and nuget packages interactively.
https://fuqua.io/CSharpRepl/
Mozilla Public License 2.0
2.95k stars 112 forks source link

Could not load file or assembly #316

Closed SvenKribitz closed 1 year ago

SvenKribitz commented 1 year ago

Version

0.6.5

What happened?

Followed the instruction to install csharprepl using dotnet tool install and started it via csharprepl but ended up with the following error (I'm on Windows 11):

csharprepl

Welcome to the C# REPL (Read Eval Print Loop)!
Type C# expressions and statements at the prompt and press Enter to evaluate them.
Type help to learn more, exit to quit, and clear to clear your terminal.

> One or more errors occurred. (Could not load file or assembly 'NuGet.Common, Version=6.6.1.2, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.)

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.Common, Version=6.6.1.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'NuGet.Common, Version=6.6.1.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at CSharpRepl.Services.Nuget.NugetPackageInstaller..ctor(IConsoleEx console, Configuration configuration)
   at CSharpRepl.Services.Roslyn.MetadataResolvers.NugetPackageMetadataResolver..ctor(IConsoleEx console, Configuration configuration) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Roslyn\MetadataResolvers\NugetPackageMetadataResolver.cs:line 25
   at CSharpRepl.Services.Roslyn.Scripting.ScriptRunner..ctor(WorkspaceManager workspaceManager, CSharpCompilationOptions compilationOptions, AssemblyReferenceService referenceAssemblyService, IConsoleEx console, Configuration configuration) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Roslyn\Scripting\ScriptRunner.cs:line 50
   at CSharpRepl.Services.Roslyn.RoslynServices.<>c__DisplayClass20_1.<.ctor>b__1() in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Roslyn\RoslynServices.cs:line 94
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at CSharpRepl.Services.Roslyn.RoslynServices.EvaluateAsync(String input, String[] args, CancellationToken cancellationToken) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Roslyn\RoslynServices.cs:line 108
   at CSharpRepl.ReadEvalPrintLoop.RunAsync(Configuration config) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl\ReadEvalPrintLoop.cs:line 79
   at CSharpRepl.Program.Main(String[] args) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl\Program.cs:line 68
   at CSharpRepl.Program.Main(String[] args) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl\Program.cs:line 74
   at CSharpRepl.Program.<Main>(String[] args)
waf commented 1 year ago

Closed in #320 (confirmed fixed in #294)