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

Failing to install NJsonSchema #299

Closed shmuelie closed 1 year ago

shmuelie commented 1 year ago

Version

0.6.5

What happened?

I can install other Nuget packages without issue but trying to install NJsonSchema fails with

Could not find package 'NJsonSchema'. Error: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at CSharpRepl.Services.Nuget.ConsoleNugetLogger.RenderLines() in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Nuget\ConsoleNugetLogger.cs:line 136
   at CSharpRepl.Services.Nuget.ConsoleNugetLogger.LogMinimal(String data) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Nuget\ConsoleNugetLogger.cs:line 74
   at CSharpRepl.Services.Nuget.ConsoleNugetLogger.Log(LogLevel level, String data) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Nuget\ConsoleNugetLogger.cs:line 49
   at CSharpRepl.Services.Nuget.ConsoleNugetLogger.Log(ILogMessage message) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Nuget\ConsoleNugetLogger.cs:line 40
   at NuGet.ProjectManagement.ConsoleProjectContext.Log(ILogMessage message)
   at NuGet.PackageManagement.ProjectContextLogger.Log(ILogMessage message)
   at NuGet.PackageManagement.PackagePreFetcher.LogFetchMessages(IEnumerable`1 fetchResults, String packagesFolderRoot, ILogger logger)
   at NuGet.PackageManagement.NuGetPackageManager.ExecuteNuGetProjectActionsAsync(NuGetProject nuGetProject, IEnumerable`1 nuGetProjectActions, INuGetProjectContext nuGetProjectContext,
PackageDownloadContext downloadContext, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.ExecuteNuGetProjectActionsAsync(NuGetProject nuGetProject, IEnumerable`1 nuGetProjectActions, INuGetProjectContext nuGetProjectContext,
PackageDownloadContext downloadContext, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext
nuGetProjectContext, PackageDownloadContext downloadContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, CancellationToken token)
   at NuGet.PackageManagement.NuGetPackageManager.InstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, ResolutionContext resolutionContext, INuGetProjectContext
nuGetProjectContext, IEnumerable`1 primarySources, IEnumerable`1 secondarySources, CancellationToken token)
   at CSharpRepl.Services.Nuget.NugetPackageInstaller.DownloadPackageAsync(PackageIdentity packageIdentity, NuGetPackageManager packageManager, ResolutionContext resolutionContext, IEnumerable`1
primarySourceRepositories, ISettings settings, CancellationToken cancellationToken) in D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Nuget\NugetPackageInstaller.cs:line 231
   at CSharpRepl.Services.Nuget.NugetPackageInstaller.InstallAsync(String packageId, String version, CancellationToken cancellationToken) in
D:\a\CSharpRepl\CSharpRepl\CSharpRepl.Services\Nuget\NugetPackageInstaller.cs:line 83

Trace output:

2023-09-21T17:03:17 - Trace session starting
2023-09-21T17:03:17 - Starting background initialization
2023-09-21T17:03:17 - Discovered dotnet version .NET Core SDK 7.0.401 at C:\Program Files\dotnet\sdk\7.0.401.
2023-09-21T17:03:17 - Available Reference Assemblies: "C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref": ["3.1.0", "6.0.21", "6.0.22", "7.0.11", "8.0.0-rc.1.23419.4"]
2023-09-21T17:03:17 - Available Implementation Assemblies: "C:\Program Files\dotnet\shared\Microsoft.NETCore.App": ["3.1.32", "6.0.21", "6.0.22", "7.0.11", "8.0.0-rc.1.23419.4"]
2023-09-21T17:03:17 - .NET Version: Microsoft.NETCore.App / 7.0.11
2023-09-21T17:03:17 - Reference Assembly Paths: C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.11\ref\net7.0
2023-09-21T17:03:17 - Implementation Assembly Paths: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.11
2023-09-21T17:03:17 - Shared Framework Paths: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.11
2023-09-21T17:03:17 - Loaded Reference Assemblies: "C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.11\ref\net7.0": ["System.Reflection.Emit.Lightweight.dll", "System.Reflection.Extensions.dll", "System.Reflection.Metadata.dll", "System.Reflection.Primitives.dll", "System.Reflection.TypeExtensions.dll", "System.Resources.Reader.dll", "System.Resources.ResourceManager.dll", "System.Resources.Writer.dll", "System.Transactions.dll", "System.Transactions.Local.dll", "System.ValueTuple.dll", "System.Web.dll", "System.Web.HttpUtility.dll", "System.Windows.dll", "System.Xml.dll", "System.Xml.Linq.dll", "System.Diagnostics.Debug.dll", "System.Diagnostics.DiagnosticSource.dll", "System.Diagnostics.FileVersionInfo.dll", "System.Diagnostics.Process.dll", "System.Diagnostics.StackTrace.dll", "System.Diagnostics.TextWriterTraceListener.dll", "System.Diagnostics.Tools.dll", "System.Diagnostics.TraceSource.dll", "System.Text.Encoding.CodePages.dll", "System.Net.Http.Json.dll", "System.Text.Encoding.dll", "System.Net.HttpListener.dll", "System.Text.Encoding.Extensions.dll", "System.Net.Mail.dll", "System.Text.Encodings.Web.dll", "System.Net.NameResolution.dll", "System.Text.Json.dll", "System.Net.NetworkInformation.dll", "System.Text.RegularExpressions.dll", "System.Net.Ping.dll", "System.Threading.Channels.dll", "System.Net.Primitives.dll", "System.Threading.dll", "System.Net.Quic.dll", "System.Runtime.CompilerServices.Unsafe.dll", "System.Runtime.CompilerServices.VisualC.dll", "System.Runtime.dll", "System.Runtime.Extensions.dll", "System.Runtime.Handles.dll", "System.Runtime.InteropServices.dll", "System.Runtime.InteropServices.JavaScript.dll", "System.Runtime.InteropServices.RuntimeInformation.dll", "System.Xml.ReaderWriter.dll", "System.Xml.Serialization.dll", "System.Xml.XDocument.dll", "System.Xml.XmlDocument.dll", "System.Xml.XmlSerializer.dll", "System.Xml.XPath.dll", "System.Xml.XPath.XDocument.dll", "WindowsBase.dll", "System.Security.AccessControl.dll", "System.Security.Claims.dll", "System.Security.Cryptography.Algorithms.dll", "System.Security.Cryptography.Cng.dll", "System.Security.Cryptography.Csp.dll", "System.Security.Cryptography.dll", "System.Security.Cryptography.Encoding.dll", "System.Security.Cryptography.OpenSsl.dll", "System.Runtime.Intrinsics.dll", "System.Runtime.Loader.dll", "System.Runtime.Numerics.dll", "System.Runtime.Serialization.dll", "System.Runtime.Serialization.Formatters.dll", "System.Runtime.Serialization.Json.dll", "System.Runtime.Serialization.Primitives.dll", "System.Runtime.Serialization.Xml.dll", "System.Diagnostics.Tracing.dll", "System.dll", "System.Drawing.dll", "System.Drawing.Primitives.dll", "System.Dynamic.Runtime.dll", "System.Formats.Asn1.dll", "System.Formats.Tar.dll", "System.Globalization.Calendars.dll", "System.Threading.Overlapped.dll", "System.Globalization.dll", "System.IO.UnmanagedMemoryStream.dll", "System.Net.Requests.dll", "System.Threading.Tasks.Dataflow.dll", "System.Globalization.Extensions.dll", "System.Linq.dll", "System.Net.Security.dll", "System.Threading.Tasks.dll", "System.IO.Compression.Brotli.dll", "System.Linq.Expressions.dll", "System.Net.ServicePoint.dll", "System.Threading.Tasks.Extensions.dll", "System.IO.Compression.dll", "System.Linq.Parallel.dll", "System.Net.Sockets.dll", "System.Threading.Tasks.Parallel.dll", "System.IO.Compression.FileSystem.dll", "System.Linq.Queryable.dll", "System.Net.WebClient.dll", "System.Threading.Thread.dll", "System.IO.Compression.ZipFile.dll", "System.Memory.dll", "System.Net.WebHeaderCollection.dll", "System.Threading.ThreadPool.dll", "System.IO.dll", "System.Net.dll", "System.Net.WebProxy.dll", "System.Threading.Timer.dll", "System.IO.FileSystem.AccessControl.dll", "System.Net.Http.dll", "System.Net.WebSockets.Client.dll", "System.ComponentModel.Primitives.dll", "System.ComponentModel.TypeConverter.dll", "System.Configuration.dll", "System.Console.dll", "System.Core.dll", "System.Data.Common.dll", "System.Data.DataSetExtensions.dll", "System.Data.dll", "System.Diagnostics.Contracts.dll", "System.Net.WebSockets.dll", "System.Security.Cryptography.Primitives.dll", "System.Numerics.dll", "System.Security.Cryptography.X509Certificates.dll", "System.Numerics.Vectors.dll", "System.Security.dll", "System.ObjectModel.dll", "System.Security.Principal.dll", "System.Reflection.DispatchProxy.dll", "System.Security.Principal.Windows.dll", "System.Reflection.dll", "System.Security.SecureString.dll", "System.Reflection.Emit.dll", "System.ServiceModel.Web.dll", "System.Reflection.Emit.ILGeneration.dll", "System.ServiceProcess.dll", "System.IO.FileSystem.dll", "System.IO.FileSystem.DriveInfo.dll", "System.IO.FileSystem.Primitives.dll", "System.IO.FileSystem.Watcher.dll", "System.IO.IsolatedStorage.dll", "System.IO.MemoryMappedFiles.dll", "System.IO.Pipes.AccessControl.dll", "System.IO.Pipes.dll", "Microsoft.CSharp.dll", "Microsoft.VisualBasic.Core.dll", "Microsoft.VisualBasic.dll", "Microsoft.Win32.Primitives.dll", "Microsoft.Win32.Registry.dll", "mscorlib.dll", "netstandard.dll", "System.AppContext.dll", "System.Buffers.dll", "System.Collections.Concurrent.dll", "System.Collections.dll", "System.Collections.Immutable.dll", "System.Collections.NonGeneric.dll", "System.Collections.Specialized.dll", "System.ComponentModel.Annotations.dll", "System.ComponentModel.DataAnnotations.dll", "System.ComponentModel.dll", "System.ComponentModel.EventBasedAsync.dll"]
2023-09-21T17:03:17 - Loaded Implementation Assemblies: "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\7.0.11": ["Microsoft.Win32.Primitives.dll", "Microsoft.Win32.Registry.dll", "mscorlib.dll", "netstandard.dll", "System.Globalization.dll", "System.Globalization.Extensions.dll", "System.IO.Compression.Brotli.dll", "System.IO.Compression.dll", "System.IO.Compression.FileSystem.dll", "System.IO.Compression.ZipFile.dll", "System.IO.dll", "System.IO.FileSystem.AccessControl.dll", "System.IO.FileSystem.dll", "System.IO.FileSystem.DriveInfo.dll", "System.IO.FileSystem.Primitives.dll", "System.IO.FileSystem.Watcher.dll", "System.IO.IsolatedStorage.dll", "System.IO.MemoryMappedFiles.dll", "System.IO.Pipes.AccessControl.dll", "System.IO.Pipes.dll", "System.IO.UnmanagedMemoryStream.dll", "System.Data.dll", "System.Diagnostics.Contracts.dll", "System.Diagnostics.Debug.dll", "System.Diagnostics.DiagnosticSource.dll", "System.Diagnostics.FileVersionInfo.dll", "System.Diagnostics.Process.dll", "System.Diagnostics.StackTrace.dll", "System.Diagnostics.TextWriterTraceListener.dll", "System.Diagnostics.Tools.dll", "System.Reflection.Emit.Lightweight.dll", "System.Runtime.CompilerServices.VisualC.dll", "System.Reflection.Extensions.dll", "System.Runtime.dll", "System.Reflection.Metadata.dll", "System.Runtime.Extensions.dll", "System.Reflection.Primitives.dll", "System.Runtime.Handles.dll", "System.Reflection.TypeExtensions.dll", "System.Runtime.InteropServices.dll", "System.Resources.Reader.dll", "System.Runtime.InteropServices.JavaScript.dll", "System.Resources.ResourceManager.dll", "System.Runtime.InteropServices.RuntimeInformation.dll", "System.Resources.Writer.dll", "System.Runtime.Intrinsics.dll", "System.Runtime.CompilerServices.Unsafe.dll", "System.Runtime.Loader.dll", "System.Threading.ThreadPool.dll", "System.Threading.Timer.dll", "System.Transactions.dll", "System.Transactions.Local.dll", "System.ValueTuple.dll", "System.Web.dll", "System.Web.HttpUtility.dll", "System.Windows.dll", "System.Xml.dll", "Microsoft.CSharp.dll", "Microsoft.VisualBasic.Core.dll", "Microsoft.VisualBasic.dll", "System.Net.Sockets.dll", "System.Security.Cryptography.Cng.dll", "System.AppContext.dll", "System.Net.WebClient.dll", "System.Security.Cryptography.Csp.dll", "System.Buffers.dll", "System.Net.WebHeaderCollection.dll", "System.Security.Cryptography.dll", "System.Collections.Concurrent.dll", "System.Net.WebProxy.dll", "System.Security.Cryptography.Encoding.dll", "System.Collections.dll", "System.Net.WebSockets.Client.dll", "System.Security.Cryptography.OpenSsl.dll", "System.Collections.Immutable.dll", "System.Net.WebSockets.dll", "System.Security.Cryptography.Primitives.dll", "System.Collections.NonGeneric.dll", "System.Numerics.dll", "System.Security.Cryptography.X509Certificates.dll", "System.Collections.Specialized.dll", "System.Numerics.Vectors.dll", "System.Security.dll", "System.ComponentModel.Annotations.dll", "System.ObjectModel.dll", "System.Security.Principal.dll", "System.ComponentModel.DataAnnotations.dll", "System.Net.Mail.dll", "System.Net.NameResolution.dll", "System.Net.NetworkInformation.dll", "System.Net.Ping.dll", "System.Net.Primitives.dll", "System.Net.Quic.dll", "System.Net.Requests.dll", "System.Net.Security.dll", "System.Net.ServicePoint.dll", "System.Text.RegularExpressions.dll", "System.Threading.Channels.dll", "System.Threading.dll", "System.Threading.Overlapped.dll", "System.Threading.Tasks.Dataflow.dll", "System.Threading.Tasks.dll", "System.Threading.Tasks.Extensions.dll", "System.Threading.Tasks.Parallel.dll", "System.Threading.Thread.dll", "System.Runtime.Numerics.dll", "System.Runtime.Serialization.dll", "System.Runtime.Serialization.Formatters.dll", "System.Runtime.Serialization.Json.dll", "System.Runtime.Serialization.Primitives.dll", "System.Runtime.Serialization.Xml.dll", "System.Security.AccessControl.dll", "System.Security.Claims.dll", "System.Security.Cryptography.Algorithms.dll", "System.Security.Principal.Windows.dll", "System.Security.SecureString.dll", "System.ServiceModel.Web.dll", "System.ServiceProcess.dll", "System.Text.Encoding.CodePages.dll", "System.Text.Encoding.dll", "System.Text.Encoding.Extensions.dll", "System.Text.Encodings.Web.dll", "System.Text.Json.dll", "System.Xml.Linq.dll", "System.Xml.ReaderWriter.dll", "System.Xml.Serialization.dll", "System.Xml.XDocument.dll", "System.Xml.XmlDocument.dll", "System.Xml.XmlSerializer.dll", "System.Xml.XPath.dll", "System.Xml.XPath.XDocument.dll", "WindowsBase.dll", "System.Linq.dll", "System.Linq.Expressions.dll", "System.Linq.Parallel.dll", "System.Linq.Queryable.dll", "System.Memory.dll", "System.Net.dll", "System.Net.Http.dll", "System.Net.Http.Json.dll", "System.Net.HttpListener.dll", "System.Private.CoreLib.dll", "System.Private.DataContractSerialization.dll", "System.Private.Uri.dll", "System.Private.Xml.dll", "System.Private.Xml.Linq.dll", "System.Reflection.DispatchProxy.dll", "System.Reflection.dll", "System.Reflection.Emit.dll", "System.Reflection.Emit.ILGeneration.dll", "System.Diagnostics.TraceSource.dll", "System.Diagnostics.Tracing.dll", "System.dll", "System.Drawing.dll", "System.Drawing.Primitives.dll", "System.Dynamic.Runtime.dll", "System.Formats.Asn1.dll", "System.Formats.Tar.dll", "System.Globalization.Calendars.dll", "System.ComponentModel.dll", "System.ComponentModel.EventBasedAsync.dll", "System.ComponentModel.Primitives.dll", "System.ComponentModel.TypeConverter.dll", "System.Configuration.dll", "System.Console.dll", "System.Core.dll", "System.Data.Common.dll", "System.Data.DataSetExtensions.dll"]
2023-09-21T17:03:18 - MEF Default Assemblies: C:\Users\senglard\.dotnet\tools\.store\csharprepl\0.6.5\csharprepl\0.6.5\tools\net7.0\any\Microsoft.CodeAnalysis.Workspaces.dll, C:\Users\senglard\.dotnet\tools\.store\csharprepl\0.6.5\csharprepl\0.6.5\tools\net7.0\any\Microsoft.CodeAnalysis.CSharp.Workspaces.dll, C:\Users\senglard\.dotnet\tools\.store\csharprepl\0.6.5\csharprepl\0.6.5\tools\net7.0\any\Microsoft.CodeAnalysis.Features.dll, C:\Users\senglard\.dotnet\tools\.store\csharprepl\0.6.5\csharprepl\0.6.5\tools\net7.0\any\Microsoft.CodeAnalysis.CSharp.Features.dll
2023-09-21T17:03:18 - Background initialization complete
2023-09-21T17:03:18 - Warm-up Starting
2023-09-21T17:03:20 - Warm-up Complete