dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.87k stars 4.01k forks source link

"csc.exe" exited with code -2146232797 ("CompilerServer: server failed [...] Reached end of stream before end of read.") #59336

Closed Unknown6656 closed 2 years ago

Unknown6656 commented 2 years ago

Version Used:

Steps to Reproduce: I am trying to re-compile my library (Unknown6656/Unknown6656.Core@e36c60073ed88f5c5b2b2de89b3cf791fa0fefd7) which worked perfectly fine in VS 17.1 Preview 1.1 using .NET SDK 5.0.104.

However, I currently get the following error:

Error   MSB6006 "csc.exe" exited with code -2146232797. Unknown6656.Core

Here is the relevant section from the build log:

[...]

1>Target CoreCompile:
1>  Building target "CoreCompile" completely.
1>  Output file "obj\Release\Unknown6656.Core.dll" does not exist.
1>  Using "Csc" task from assembly "C:\Program Files\VS2022P\MSBuild\Current\Bin\Roslyn\Microsoft.Build.Tasks.CodeAnalysis.dll".
1>  Task "Csc"
1>    C:\Program Files\VS2022P\MSBuild\Current\Bin\Roslyn\csc.exe
            /noconfig
            /unsafe+
            /checked-
            /nowarn:1701,1702,8652,1701,1702,2008
            /fullpaths
            /nostdlib+
            /errorreport:prompt
            /warn:6
            /define:TRACE;DOUBLE_PRECISION;RELEASE;NET;NET6_0;NETCOREAPP;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NETCOREAPP1_0_OR_GREATER;NETCOREAPP1_1_OR_GREATER;NETCOREAPP2_0_OR_GREATER;NETCOREAPP2_1_OR_GREATER;NETCOREAPP2_2_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER
            /errorendlocation
            /preferreduilang:en-US
            /highentropyva+
            /nullable:enable
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\Microsoft.CSharp.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\Microsoft.VisualBasic.Core.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\Microsoft.VisualBasic.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\Microsoft.Win32.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\Microsoft.Win32.Registry.dll"
            /reference:C:\Users\unknown6656\.nuget\packages\microsoft.win32.systemevents\6.0.2-mauipre.1.22054.8\lib\net6.0\Microsoft.Win32.SystemEvents.dll
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\mscorlib.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\netstandard.dll"
            /reference:C:\Users\unknown6656\.nuget\packages\ssh.net\2020.0.1\lib\netstandard2.0\Renci.SshNet.dll
            /reference:C:\Users\unknown6656\.nuget\packages\sshnet.security.cryptography\1.3.0\lib\netstandard2.0\SshNet.Security.Cryptography.dll
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.AppContext.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Buffers.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Collections.Concurrent.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Collections.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Collections.Immutable.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Collections.NonGeneric.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Collections.Specialized.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ComponentModel.Annotations.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ComponentModel.DataAnnotations.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ComponentModel.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ComponentModel.EventBasedAsync.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ComponentModel.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ComponentModel.TypeConverter.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Configuration.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Console.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Core.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Data.Common.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Data.DataSetExtensions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Data.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.Contracts.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.Debug.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.DiagnosticSource.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.FileVersionInfo.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.Process.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.StackTrace.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.TextWriterTraceListener.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.Tools.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.TraceSource.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Diagnostics.Tracing.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.dll"
            /reference:C:\Users\unknown6656\.nuget\packages\system.drawing.common\6.0.2-mauipre.1.22054.8\lib\net6.0\System.Drawing.Common.dll
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Drawing.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Drawing.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Dynamic.Runtime.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Formats.Asn1.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Globalization.Calendars.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Globalization.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Globalization.Extensions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.Compression.Brotli.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.Compression.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.Compression.FileSystem.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.Compression.ZipFile.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.FileSystem.AccessControl.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.FileSystem.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.FileSystem.DriveInfo.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.FileSystem.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.FileSystem.Watcher.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.IsolatedStorage.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.MemoryMappedFiles.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.Pipes.AccessControl.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.Pipes.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.IO.UnmanagedMemoryStream.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Linq.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Linq.Expressions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Linq.Parallel.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Linq.Queryable.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Memory.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Http.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Http.Json.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.HttpListener.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Mail.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.NameResolution.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.NetworkInformation.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Ping.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Requests.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Security.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.ServicePoint.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.Sockets.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.WebClient.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.WebHeaderCollection.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.WebProxy.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.WebSockets.Client.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Net.WebSockets.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Numerics.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Numerics.Vectors.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ObjectModel.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.DispatchProxy.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.Emit.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.Emit.ILGeneration.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.Emit.Lightweight.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.Extensions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.Metadata.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Reflection.TypeExtensions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Resources.Reader.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Resources.ResourceManager.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Resources.Writer.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.CompilerServices.Unsafe.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.CompilerServices.VisualC.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Extensions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Handles.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.InteropServices.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.InteropServices.RuntimeInformation.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Intrinsics.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Loader.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Numerics.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Serialization.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Serialization.Formatters.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Serialization.Json.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Serialization.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Runtime.Serialization.Xml.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.AccessControl.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Claims.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Cryptography.Algorithms.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Cryptography.Cng.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Cryptography.Csp.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Cryptography.Encoding.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Cryptography.OpenSsl.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Cryptography.Primitives.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Cryptography.X509Certificates.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Principal.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.Principal.Windows.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Security.SecureString.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ServiceModel.Web.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ServiceProcess.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Text.Encoding.CodePages.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Text.Encoding.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Text.Encoding.Extensions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Text.Encodings.Web.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Text.Json.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Text.RegularExpressions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Channels.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Overlapped.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Tasks.Dataflow.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Tasks.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Tasks.Extensions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Tasks.Parallel.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Thread.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.ThreadPool.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Threading.Timer.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Transactions.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Transactions.Local.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.ValueTuple.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Web.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Web.HttpUtility.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Windows.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.Linq.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.ReaderWriter.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.Serialization.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.XDocument.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.XmlDocument.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.XmlSerializer.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.XPath.dll"
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\System.Xml.XPath.XDocument.dll"
            /reference:C:\Users\unknown6656\.nuget\packages\unknown6656.discriminatedunions\1.0.0\lib\netcoreapp3.1\Unknown6656.DiscriminatedUnions.dll
            /reference:C:\Users\unknown6656\.nuget\packages\unknown6656.indexableproperties\1.0.0\lib\netcoreapp3.1\Unknown6656.IndexableProperties.dll
            /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\ref\net6.0\WindowsBase.dll"
            /debug-
            /debug:portable
            /filealign:512
            /optimize+
            /out:obj\Release\Unknown6656.Core.dll
            /target:library
            /warnaserror-
            /utf8output
            /deterministic+
            /langversion:preview
            /analyzerconfig:obj\Release\Unknown6656.Core.GeneratedMSBuildEditorConfig.editorconfig
            /analyzerconfig:"C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\analyzers\build\config\analysislevel_6_default.editorconfig"
            /analyzer:"C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll"
            /analyzer:"C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll"
            /analyzer:"C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\ILLink.CodeFixProvider.dll"
            /analyzer:"C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\ILLink.RoslynAnalyzer.dll"
            /analyzer:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll"
            Assembly.cs
            Box.cs
            Common\ConcurrentHashSet.cs
            Common\CustomEqualityComparer.cs
            Common\FunctionExtensions.cs
            Common\LINQ.cs
            Common\LINQExtensions.cs
            Common\NativeInterop.cs
            Common\ObservableDictionary.cs
            Common\StringExtensions.cs
            Controls\Console\ConsoleExtensions.cs
            Controls\Console\ControlHost.cs
            Controls\Console\Controls.cs
            Imaging\BitmapEffect.cs
            Imaging\BitmapExtensions.cs
            Imaging\BitmapLocker.cs
            Imaging\BitmapMasking.cs
            Imaging\Color.cs
            Imaging\ColorMemberGenerator.cs
            Imaging\Effects\Effects.cs
            Imaging\FunctionPlotter.cs
            Imaging\HDRBitmap.cs
            Imaging\PhysicalSpectrums.cs
            Imaging\ShapeRasterizer.cs
            Imaging\Spectrum.cs
            Imaging\VideoAssembler.cs
            IO\BinaryStreamExtensions.cs
            IO\COMObject.cs
            IO\CompressionFunction.cs
            IO\CompressionFunctions.cs
            IO\FileSystemExtensions.cs
            IO\INIFile.cs
            IO\Serializer.cs
            IO\UnsafeFunctionPointer.cs
            Mathematics\Analysis\Cached.cs
            Mathematics\Analysis\Complex.cs
            Mathematics\Analysis\DensityFunction.cs
            Mathematics\Analysis\Equation.cs
            Mathematics\Analysis\FourierTransform.cs
            Mathematics\Analysis\Function.cs
            Mathematics\Analysis\Functions.cs
            Mathematics\Analysis\Polynomial.cs
            Mathematics\Analysis\Polynomial.Extensions.cs
            Mathematics\Cryptography\Cipher.cs
            Mathematics\Cryptography\HashFunction.cs
            Mathematics\Cryptography\HashFunctions.cs
            Mathematics\Cryptography\TextbookRSA.cs
            Mathematics\Cryptography\Vigenere.cs
            Mathematics\Geometry\Shape2D.cs
            Mathematics\Graphs\Computation\FiniteAutomaton.cs
            Mathematics\Graphs\Computation\TuringMachine.cs
            Mathematics\Graphs\Graph.cs
            Mathematics\Graphs\Heaps.cs
            Mathematics\Graphs\Tree.cs
            Mathematics\LinearAlgebra\Extensions.cs
            Mathematics\LinearAlgebra\Interfaces.cs
            Mathematics\LinearAlgebra\Matrix.cs
            Mathematics\LinearAlgebra\ModuloRing.cs
            Mathematics\LinearAlgebra\NDimensional.cs
            Mathematics\LinearAlgebra\Norms.cs
            Mathematics\LinearAlgebra\Scalar.cs
            Mathematics\LinearAlgebra\Vector.cs
            Mathematics\LinearAlgebra\VectorSpace.cs
            Mathematics\MathExtensions.cs
            Mathematics\Numerics\Fraction.cs
            Mathematics\Numerics\Random.cs
            Mathematics\Numerics\Sequence.cs
            Mathematics\Numerics\UInt128.cs
            Mathematics\Numerics\VarInt.cs
            Mathematics\PerlinNoise.cs
            Mathematics\Primes.cs
            Mathematics\StackBasedCalculator.cs
            Mathematics\Statistics\ProbabilityDistribution.cs
            Mathematics\Statistics\RegressionDataSet.cs
            Optimization\LinearEquationSolvers.cs
            Optimization\OptimizationProblems.cs
            Optimization\ParticleSwarmOptimization.cs
            __empty.cs
            "obj\Release\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs"
            obj\Release\Unknown6656.Core.AssemblyInfo.cs
            /warnaserror+:NU1605

1>    CompilerServer: server failed - server rejected the request 'Error reading response: Reached end of stream before end of read.' - dcaebc47-26b7-40bd-b525-50a0f9f02b7e
1>    Microsoft (R) Visual C# Compiler version 4.1.0-3.22071.8 (663228dd)
1>    Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>    C:\Program Files\VS2022P\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error MSB6006: "csc.exe" exited with code -2146232797.
1>  Done executing task "Csc" -- FAILED.

[...]

The .csproj file in question can be seen here: https://github.com/Unknown6656/Unknown6656.Core/blob/e36c60073ed88f5c5b2b2de89b3cf791fa0fefd7/Unknown6656.Core/Unknown6656.Core.csproj


I already tried the following - without success:

  1. Clean reinstall of VS2022.
  2. Clean reinstall of .NET5 and .NET6 SDK.
  3. Repairing the existing VS2022 and .NET SDK installations.
  4. Rebuilding the entire solution/project after deleting the bin/ and obj/ folders.
  5. Rebuilding the entire solution/project after removing the .vs/ folder and .user/.suo-files.

Can someone help me on this issue? Thank you.

Unknown6656 commented 2 years ago

Addendum: This error only occurs with this specific project/solution. I do not get the error with other .csproj/.sln files. This suggests that the error is not residing in an external compiler process or "server", as the error message might suggest.

jcouv commented 2 years ago

Feels like the server compiler crashed. Could you enable crash dumps (see instructions) and see if the repro produces one? If yes, opening the crash dump in Visual Studio, then debugging in managed mode should let you see the stack trace of the crash. That would be useful information.

Unknown6656 commented 2 years ago

@jcouv Thanks for the instructions. I tried to debug the memory dump file, however, I was unable to load all the symbols and therefore only had the raw assembly code, the heap dump, and an enumeration of all running tasks/threads. Due to my lack of knowledge of the roslyn codebase, I was unable to dig further into the problem.

Could you possibly give me a few pointers?


If you or someone else wishes to take a look at the memory dump, it is available here: http://unknown6656.com/csc.exe.21680.dmp

jcouv commented 2 years ago

@Unknown6656 When you debug the dump file, I assume you'll get a popup indicating that an exception happened. Can you copy the details from that exception (especially the stack trace)? Alternatively, I assume the active thread will be the interesting one, so if you open "Call Stack" window you could select the entire stack for the active thread and copy/paste it here. Thanks

jcouv commented 2 years ago

@Unknown6656 Also, if you feel comfortable sharing the dump file with us, here are some instructions for doing that (you can attach the dump file when giving VS feedback):

Unknown6656 commented 2 years ago

@jcouv: I uploaded the dump file to my web server (see: http://unknown6656.com/csc.exe.21680.dmp), however, I can also upload it via the VS feedback system if you want to.

You are right in assuming that I get the exception popup. This is the stack trace as shown in the exception dialog:

   at Microsoft.CodeAnalysis.CSharp.PlainUnboundLambdaState.ParameterName(Int32 index)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.<>c__DisplayClass253_0.<ReportNullabilityMismatchWithTargetDelegate>g__reportBadDelegateParameter|1(BindingDiagnosticBag bag, MethodSymbol sourceInvokeMethod, MethodSymbol targetInvokeMethod, ParameterSymbol parameterSymbol, Boolean topLevel, Location location)
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.CheckValidNullableMethodOverride[TArg](CSharpCompilation compilation, MethodSymbol baseMethod, MethodSymbol overrideMethod, BindingDiagnosticBag diagnostics, ReportMismatchInReturnType`1 reportMismatchInReturnType, ReportMismatchInParameterType`1 reportMismatchInParameterType, TArg extraArgument, Boolean invokedAsExtensionMethod)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.ReportNullabilityMismatchWithTargetDelegate(Location location, NamedTypeSymbol delegateType, BoundLambda lambda)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitConversion(BoundConversion conversionOpt, BoundExpression conversionOperand, Conversion conversion, TypeWithAnnotations targetTypeWithNullability, TypeWithState operandType, Boolean checkConversion, Boolean fromExplicitCast, Boolean useLegacyWarnings, AssignmentKind assignmentKind, ParameterSymbol parameterOpt, Boolean reportTopLevelWarnings, Boolean reportRemainingWarnings, Boolean extensionMethodThisArgument, Optional`1 stateForLambda, Boolean trackMembers, Location diagnosticLocationOpt, ArrayBuilder`1 previousArgumentConversionResults)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitConversion(BoundConversion node)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitExpressionWithoutStackGuard(BoundExpression node)
   at Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor.VisitExpressionWithStackGuard(Int32& recursionDepth, BoundExpression node)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitEventAssignmentOperator(BoundEventAssignmentOperator node)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitExpressionWithoutStackGuard(BoundExpression node)
   at Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor.VisitExpressionWithStackGuard(BoundExpression node)
   at Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor.VisitExpressionWithStackGuard(Int32& recursionDepth, BoundExpression node)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitRvalue(BoundExpression node, Boolean isKnownToBeAnLvalue)
   at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.VisitExpressionStatement(BoundExpressionStatement node)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitStatementsWithLocalFunctions(BoundBlock block)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitBlock(BoundBlock node)
   at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.VisitWithStackGuard(BoundNode node)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.Visit(BoundNode node)
   at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.VisitMethodBodies(BoundBlock blockBody, BoundBlock expressionBody)
   at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.VisitConstructorMethodBody(BoundConstructorMethodBody node)
   at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.VisitWithStackGuard(BoundNode node)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.Visit(BoundNode node)
   at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.Scan(Boolean& badRegion)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.Scan(Boolean& badRegion)
   at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.Analyze(Boolean& badRegion, Optional`1 initialState)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.Analyze(NullableWalker walker, Symbol symbol, DiagnosticBag diagnostics, Optional`1 initialState, Builder snapshotBuilderOpt, Boolean requiresAnalysis)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.Analyze(CSharpCompilation compilation, Symbol symbol, BoundNode node, Binder binder, Conversions conversions, DiagnosticBag diagnostics, Boolean useConstructorExitWarnings, Boolean useDelegateInvokeParameterTypes, Boolean useDelegateInvokeReturnType, MethodSymbol delegateInvokeMethodOpt, VariableState initialState, Builder analyzedNullabilityMapOpt, Builder snapshotBuilderOpt, ArrayBuilder`1 returnTypesOpt, Boolean getFinalNullableState, VariableState& finalNullableState, Boolean requiresAnalysis)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.AnalyzeWithSemanticInfo(CSharpCompilation compilation, Symbol symbol, BoundNode node, Binder binder, VariableState initialState, DiagnosticBag diagnostics, Boolean createSnapshots, Boolean requiresAnalysis)
   at Microsoft.CodeAnalysis.CSharp.NullableWalker.AnalyzeAndRewrite(CSharpCompilation compilation, Symbol symbol, BoundNode node, Binder binder, VariableState initialState, DiagnosticBag diagnostics, Boolean createSnapshots, SnapshotManager& snapshotManager, ImmutableDictionary`2& remappedSymbols)
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.BindMethodBody(MethodSymbol method, TypeCompilationState compilationState, BindingDiagnosticBag diagnostics, VariableState nullableInitialState, Boolean reportNullableDiagnostics, Boolean includesFieldInitializers, ImportChain& importChain, Boolean& originalBodyNested, InitialState& forSemanticModel)
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(MethodSymbol methodSymbol, Int32 methodOrdinal, ProcessedFieldInitializers& processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, TypeCompilationState compilationState)
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType)
   at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>c__DisplayClass25_0.<CompileNamedTypeAsync>b__0()

When inspecting the current thread, I get the following stack trace (this trace includes the argument values of each function call):

[Managed to Native Transition]
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedTypeAsync.AnonymousMethod__0()
[Native to Managed Transition]
[Managed to Native Transition]
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.PlainUnboundLambdaState.ParameterName(int index = 1)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.ReportNullabilityMismatchWithTargetDelegate.__reportBadDelegateParameter|1(Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag bag, Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol sourceInvokeMethod, Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol targetInvokeMethod, Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol parameterSymbol, bool topLevel, Microsoft.CodeAnalysis.Location location)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.Symbols.SourceMemberContainerTypeSymbol.CheckValidNullableMethodOverride<Microsoft.CodeAnalysis.Location>(Microsoft.CodeAnalysis.CSharp.CSharpCompilation compilation, Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol baseMethod = The runtime is unable to evaluate this expression., Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol overrideMethod = The runtime is unable to evaluate this expression., Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag diagnostics, Microsoft.CodeAnalysis.CSharp.Symbols.ReportMismatchInReturnType<Microsoft.CodeAnalysis.Location> reportMismatchInReturnType, Microsoft.CodeAnalysis.CSharp.Symbols.ReportMismatchInParameterType<Microsoft.CodeAnalysis.Location> reportMismatchInParameterType, Microsoft.CodeAnalysis.Location extraArgument, bool invokedAsExtensionMethod)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.ReportNullabilityMismatchWithTargetDelegate(Microsoft.CodeAnalysis.Location location = SourceLocation(L:\Projects.VisualStudio\Unknown6656.Core\Unknown6656.Core\Controls\Console\Controls.cs@680:35)"delegate { RequestRender(); }", Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol delegateType, Microsoft.CodeAnalysis.CSharp.BoundLambda lambda)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitConversion(Microsoft.CodeAnalysis.CSharp.BoundConversion conversionOpt = BoundConversion delegate { RequestRender(); }, Microsoft.CodeAnalysis.CSharp.BoundExpression conversionOperand, Microsoft.CodeAnalysis.CSharp.Conversion conversion, Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations targetTypeWithNullability = Evaluation of method Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations.GetDebuggerDisplay requires information which is not present in the minidump you are debugging.  If you are debugging a minidump without heap, you may be able to fix this problem by collecting a new minidump with heap and evaluating the expression again., Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithState operandType, bool checkConversion, bool fromExplicitCast, bool useLegacyWarnings, Microsoft.CodeAnalysis.CSharp.NullableWalker.AssignmentKind assignmentKind, Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol parameterOpt, bool reportTopLevelWarnings, bool reportRemainingWarnings, bool extensionMethodThisArgument, Microsoft.CodeAnalysis.Optional<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState> stateForLambda, bool trackMembers, Microsoft.CodeAnalysis.Location diagnosticLocationOpt, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder<Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitResult> previousArgumentConversionResults)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitConversion(Microsoft.CodeAnalysis.CSharp.BoundConversion node = BoundConversion delegate { RequestRender(); })
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitExpressionWithoutStackGuard(Microsoft.CodeAnalysis.CSharp.BoundExpression node = BoundConversion delegate { RequestRender(); })
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor.VisitExpressionWithStackGuard(ref int recursionDepth, Microsoft.CodeAnalysis.CSharp.BoundExpression node)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitEventAssignmentOperator(Microsoft.CodeAnalysis.CSharp.BoundEventAssignmentOperator node = BoundEventAssignmentOperator PickedColorChanged += delegate { RequestRender(); })
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitExpressionWithoutStackGuard(Microsoft.CodeAnalysis.CSharp.BoundExpression node = BoundEventAssignmentOperator PickedColorChanged += delegate { RequestRender(); })
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor.VisitExpressionWithStackGuard(Microsoft.CodeAnalysis.CSharp.BoundExpression node = BoundEventAssignmentOperator PickedColorChanged += delegate { RequestRender(); })
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor.VisitExpressionWithStackGuard(ref int recursionDepth = 2, Microsoft.CodeAnalysis.CSharp.BoundExpression node)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitRvalue(Microsoft.CodeAnalysis.CSharp.BoundExpression node = BoundEventAssignmentOperator PickedColorChanged += delegate { RequestRender(); }, bool isKnownToBeAnLvalue)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.AbstractFlowPass<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState, System.__Canon>.VisitExpressionStatement(Microsoft.CodeAnalysis.CSharp.BoundExpressionStatement node)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitStatementsWithLocalFunctions(Microsoft.CodeAnalysis.CSharp.BoundBlock block)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.VisitBlock(Microsoft.CodeAnalysis.CSharp.BoundBlock node)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.AbstractFlowPass<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState, System.__Canon>.VisitWithStackGuard(Microsoft.CodeAnalysis.CSharp.BoundNode node)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.Visit(Microsoft.CodeAnalysis.CSharp.BoundNode node = BoundBlock {
            Size = new Size(18, 6);
            MaximumSize = Size;
            MinimumSize = Size;
            CanChangeText = false;
            BorderStyle = BorderStyle.Rounded;
            FocusedStyle = FocusedStyle.RenderAsNormal;
            PickedColorChanged += delegate { RequestRender(); };
            SelectedHexIndexChanged += delegate { RequestRender(); };
            SelectedChannelIndexChanged += delegate { RequestRender(); };
            KeyPress += ColorPicker_KeyPress;
        })
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.AbstractFlowPass<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState, System.__Canon>.VisitMethodBodies(Microsoft.CodeAnalysis.CSharp.BoundBlock blockBody, Microsoft.CodeAnalysis.CSharp.BoundBlock expressionBody)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.AbstractFlowPass<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState, System.__Canon>.VisitConstructorMethodBody(Microsoft.CodeAnalysis.CSharp.BoundConstructorMethodBody node)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.AbstractFlowPass<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState, System.__Canon>.VisitWithStackGuard(Microsoft.CodeAnalysis.CSharp.BoundNode node)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.Visit(Microsoft.CodeAnalysis.CSharp.BoundNode node = BoundConstructorMethodBody public ColorPicker(ControlHost host)
            : base(host)
        {
            Size = new Size(18, 6);
            MaximumSize = Size;
            MinimumSize = Size;
            CanChangeText = false;
            BorderStyle = BorderStyle.Rounded;
            FocusedStyle = FocusedStyle.RenderAsNormal;
            PickedColorChanged += delegate { RequestRender(); };
            SelectedHexIndexChanged += delegate { RequestRender(); };
            SelectedChannelIndexChanged += delegate { RequestRender(); };
            KeyPress += ColorPicker_KeyPress;
        })
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.AbstractFlowPass<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState, Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalFunctionState>.Scan(ref bool badRegion = false)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.Scan(ref bool badRegion)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.AbstractFlowPass<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState, Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalFunctionState>.Analyze(ref bool badRegion = false, Microsoft.CodeAnalysis.Optional<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState> initialState)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.Analyze(Microsoft.CodeAnalysis.CSharp.NullableWalker walker = {NullableWalker this!this._PickedColor!this._selectedchannelindex!this._selectedhexindex!this.UseDefaultTextRenderer!this.SelectedChannelIndexChanged?this.SelectedHexIndexChanged?this.PickedColorChanged?Red!host!!this.Size!this.MaximumSize!this.MinimumSize!this.CanChangeText!this.BorderStyle!Rounded!this.FocusedStyle!RenderAsNormal!}, Microsoft.CodeAnalysis.CSharp.Symbol symbol = The runtime is unable to evaluate this expression., Microsoft.CodeAnalysis.DiagnosticBag diagnostics = Count = 0, Microsoft.CodeAnalysis.Optional<Microsoft.CodeAnalysis.CSharp.NullableWalker.LocalState> initialState, Microsoft.CodeAnalysis.CSharp.NullableWalker.SnapshotManager.Builder snapshotBuilderOpt = {Microsoft.CodeAnalysis.CSharp.NullableWalker.SnapshotManager.Builder}, bool requiresAnalysis = true)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.Analyze(Microsoft.CodeAnalysis.CSharp.CSharpCompilation compilation, Microsoft.CodeAnalysis.CSharp.Symbol symbol, Microsoft.CodeAnalysis.CSharp.BoundNode node, Microsoft.CodeAnalysis.CSharp.Binder binder, Microsoft.CodeAnalysis.CSharp.Conversions conversions, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, bool useConstructorExitWarnings, bool useDelegateInvokeParameterTypes, bool useDelegateInvokeReturnType, Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol delegateInvokeMethodOpt, Microsoft.CodeAnalysis.CSharp.NullableWalker.VariableState initialState, System.Collections.Immutable.ImmutableDictionary<Microsoft.CodeAnalysis.CSharp.BoundExpression, (Microsoft.CodeAnalysis.NullabilityInfo, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol)>.Builder analyzedNullabilityMapOpt, Microsoft.CodeAnalysis.CSharp.NullableWalker.SnapshotManager.Builder snapshotBuilderOpt, Microsoft.CodeAnalysis.PooledObjects.ArrayBuilder<(Microsoft.CodeAnalysis.CSharp.BoundReturnStatement, Microsoft.CodeAnalysis.CSharp.Symbols.TypeWithAnnotations)> returnTypesOpt, bool getFinalNullableState = false, out Microsoft.CodeAnalysis.CSharp.NullableWalker.VariableState finalNullableState = null, bool requiresAnalysis)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.AnalyzeWithSemanticInfo(Microsoft.CodeAnalysis.CSharp.CSharpCompilation compilation, Microsoft.CodeAnalysis.CSharp.Symbol symbol, Microsoft.CodeAnalysis.CSharp.BoundNode node, Microsoft.CodeAnalysis.CSharp.Binder binder, Microsoft.CodeAnalysis.CSharp.NullableWalker.VariableState initialState, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, bool createSnapshots, bool requiresAnalysis)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.NullableWalker.AnalyzeAndRewrite(Microsoft.CodeAnalysis.CSharp.CSharpCompilation compilation, Microsoft.CodeAnalysis.CSharp.Symbol symbol, Microsoft.CodeAnalysis.CSharp.BoundNode node = BoundConstructorMethodBody public ColorPicker(ControlHost host)
            : base(host)
        {
            Size = new Size(18, 6);
            MaximumSize = Size;
            MinimumSize = Size;
            CanChangeText = false;
            BorderStyle = BorderStyle.Rounded;
            FocusedStyle = FocusedStyle.RenderAsNormal;
            PickedColorChanged += delegate { RequestRender(); };
            SelectedHexIndexChanged += delegate { RequestRender(); };
            SelectedChannelIndexChanged += delegate { RequestRender(); };
            KeyPress += ColorPicker_KeyPress;
        }, Microsoft.CodeAnalysis.CSharp.Binder binder, Microsoft.CodeAnalysis.CSharp.NullableWalker.VariableState initialState, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, bool createSnapshots, out Microsoft.CodeAnalysis.CSharp.NullableWalker.SnapshotManager snapshotManager = null, ref System.Collections.Immutable.ImmutableDictionary<Microsoft.CodeAnalysis.CSharp.Symbol, Microsoft.CodeAnalysis.CSharp.Symbol> remappedSymbols = null)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.BindMethodBody(Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol method = The runtime is unable to evaluate this expression., Microsoft.CodeAnalysis.CSharp.TypeCompilationState compilationState = {Microsoft.CodeAnalysis.CSharp.TypeCompilationState}, Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag diagnostics = {Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag}, Microsoft.CodeAnalysis.CSharp.NullableWalker.VariableState nullableInitialState = {Microsoft.CodeAnalysis.CSharp.NullableWalker.VariableState}, bool reportNullableDiagnostics = true, bool includesFieldInitializers, out Microsoft.CodeAnalysis.CSharp.ImportChain importChain, out bool originalBodyNested = 'originalBodyNested' threw an exception of type 'System.NullReferenceException', out Microsoft.CodeAnalysis.CSharp.MethodBodySemanticModel.InitialState forSemanticModel = {Microsoft.CodeAnalysis.CSharp.MethodBodySemanticModel.InitialState})
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol methodSymbol, int methodOrdinal = 25, ref Microsoft.CodeAnalysis.CSharp.Binder.ProcessedFieldInitializers processedInitializers = {Microsoft.CodeAnalysis.CSharp.Binder.ProcessedFieldInitializers}, Microsoft.CodeAnalysis.CSharp.SynthesizedSubmissionFields previousSubmissionFields = null, Microsoft.CodeAnalysis.CSharp.TypeCompilationState compilationState = {Microsoft.CodeAnalysis.CSharp.TypeCompilationState})
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol containingType = The runtime is unable to evaluate this expression.)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedTypeAsync.AnonymousMethod__0()
Microsoft.CodeAnalysis.dll!Roslyn.Utilities.UICultureUtilities.WithCurrentUICulture.AnonymousMethod__0()
mscorlib.dll!System.Threading.Tasks.Task.Execute()
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot = Id = 352, Status = Running, Method = "Void <WithCurrentUICulture>b__0()")
mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution)
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch()

This is the summary of the uploaded dump file:

Dump Summary
------------
Dump File:  csc.exe.5532.dmp : C:\LocalDumps\csc.exe.5532.dmp
Last Write Time:    2022-02-12 09:45:58
Process Name:   csc.exe : C:\Program Files\VS2022P\Msbuild\Current\Bin\Roslyn\csc.exe
Process Architecture:   x64
Exception Code: 0x80131623
Exception Information:  
Heap Information:   Present

System Information
------------------
OS Version: 10.0.19042
CLR Version(s): 4.8.4420.0

Modules
-------
Module Name Module Path Module Version
----------- ----------- --------------
csc.exe C:\Program Files\VS2022P\Msbuild\Current\Bin\Roslyn\csc.exe 4.100.22.7108
ntdll.dll   C:\Windows\System32\ntdll.dll   10.0.19041.1288
mscoree.dll C:\Windows\System32\mscoree.dll 10.0.19041.1
kernel32.dll    C:\Windows\System32\kernel32.dll    10.0.19041.1348
KERNELBASE.dll  C:\Windows\System32\KERNELBASE.dll  10.0.19041.1348
advapi32.dll    C:\Windows\System32\advapi32.dll    10.0.19041.1052
msvcrt.dll  C:\Windows\System32\msvcrt.dll  7.0.19041.546
sechost.dll C:\Windows\System32\sechost.dll 10.0.19041.906
rpcrt4.dll  C:\Windows\System32\rpcrt4.dll  10.0.19041.1288
mscoreei.dll    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll    4.8.4180.0
shlwapi.dll C:\Windows\System32\shlwapi.dll 10.0.19041.1023
kernel.appcore.dll  C:\Windows\System32\kernel.appcore.dll  10.0.19041.546
version.dll C:\Windows\System32\version.dll 10.0.19041.546
clr.dll C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll 4.8.4420.0
user32.dll  C:\Windows\System32\user32.dll  10.0.19041.1202
win32u.dll  C:\Windows\System32\win32u.dll  10.0.19041.1320
VCRUNTIME140_CLR0400.dll    C:\Windows\System32\VCRUNTIME140_CLR0400.dll    14.10.25028.0
ucrtbase_clr0400.dll    C:\Windows\System32\ucrtbase_clr0400.dll    14.10.25028.0
gdi32.dll   C:\Windows\System32\gdi32.dll   10.0.19041.1202
gdi32full.dll   C:\Windows\System32\gdi32full.dll   10.0.19041.1110
msvcp_win.dll   C:\Windows\System32\msvcp_win.dll   10.0.19041.789
ucrtbase.dll    C:\Windows\System32\ucrtbase.dll    10.0.19041.789
imm32.dll   C:\Windows\System32\imm32.dll   10.0.19041.546
mscorlib.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\26a845b249aefca961715129e3e55539\mscorlib.ni.dll    4.8.4420.0
ole32.dll   C:\Windows\System32\ole32.dll   10.0.19041.1202
combase.dll C:\Windows\System32\combase.dll 10.0.19041.1348
bcryptPrimitives.dll    C:\Windows\System32\bcryptPrimitives.dll    10.0.19041.1348
cryptsp.dll C:\Windows\System32\cryptsp.dll 10.0.19041.546
rsaenh.dll  C:\Windows\System32\rsaenh.dll  10.0.19041.1052
bcrypt.dll  C:\Windows\System32\bcrypt.dll  10.0.19041.1023
CRYPTBASE.dll   C:\Windows\System32\CRYPTBASE.dll   10.0.19041.546
System.ni.dll   C:\Windows\assembly\NativeImages_v4.0.30319_64\System\43b97e99fab55055761ec7618b2bf77b\System.ni.dll    4.8.4360.0
System.Core.ni.dll  C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Core\73d4c7241519af17f6f645768e72fed4\System.Core.ni.dll  4.8.4390.0
csc.ni.exe  C:\Windows\assembly\NativeImages_v4.0.30319_64\csc\5d73946086a9965c78fa4bbf7374720a\csc.ni.exe  4.100.22.7108
Microsoft.CodeAnalysis.ni.dll   C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.Cbf18da00#\10e3c655bd903d9762eebfddd8af5401\Microsoft.CodeAnalysis.ni.dll  4.100.22.7108
Microsoft.CodeAnalysis.CSharp.ni.dll    C:\Windows\assembly\NativeImages_v4.0.30319_64\Microsoft.C1d3c2215#\e62b5f979cc351af63720d68a442320e\Microsoft.CodeAnalysis.CSharp.ni.dll   4.100.22.7108
System.Collections.Immutable.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Coll4a4f96a7#\f924773233d5c5ab8e971f283475cc94\System.Collections.Immutable.ni.dll    5.0.20.51904
shell32.dll C:\Windows\System32\shell32.dll 10.0.19041.1320
windows.storage.dll C:\Windows\System32\windows.storage.dll 10.0.19041.1320
wldp.dll    C:\Windows\System32\wldp.dll    10.0.19041.1320
SHCore.dll  C:\Windows\System32\SHCore.dll  10.0.19041.1320
profapi.dll C:\Windows\System32\profapi.dll 10.0.19041.844
System.Text.Encoding.CodePages.ni.dll   C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Textdf40403d#\3cc34bbc7beab2ba7581c43875404be3\System.Text.Encoding.CodePages.ni.dll  4.6.27129.4
System.Memory.ni.dll    C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Memory\00b1c18ae6ac66090111d572a2e60bbf\System.Memory.ni.dll  4.6.28619.1
System.Runtime.CompilerServices.Unsafe.ni.dll   C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Runtea61dfd5#\3d22bcd5005af37418d3e7aa8cee8dea\System.Runtime.CompilerServices.Unsafe.ni.dll  5.0.20.51904
System.Threading.Tasks.Extensions.ni.dll    C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Thre95f54cb4#\e3467c922eb97be1a36e652be865d35c\System.Threading.Tasks.Extensions.ni.dll   4.6.28619.1
clrjit.dll  C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clrjit.dll  4.8.4420.0
netstandard.ni.dll  C:\Windows\assembly\NativeImages_v4.0.30319_64\netstandard\f9a59923dd9196982d2a51bca73b78d0\netstandard.ni.dll  4.8.4084.0
System.Globalization.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Globalization\7784cdf89606f49f657420e88020467e\System.Globalization.ni.dll    4.8.4084.0
clbcatq.dll C:\Windows\System32\clbcatq.dll 2001.12.10941.16384
System.Numerics.Vectors.ni.dll  C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Numeb60ee252#\04c5581e765366fea283f9c0a2f3aafc\System.Numerics.Vectors.ni.dll 4.6.26515.6
System.Numerics.ni.dll  C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Numerics\8fdd4ee70c2cdcd03c0eb25e4874a122\System.Numerics.ni.dll  4.8.4084.0
System.Reflection.Metadata.ni.dll   C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Refl9556d6ea#\a466fdc08fca368a729b42a59a9c1400\System.Reflection.Metadata.ni.dll  5.0.20.51904
urlmon.dll  C:\Windows\System32\urlmon.dll  11.0.19041.1320
iertutil.dll    C:\Windows\System32\iertutil.dll    11.0.19041.1266
srvcli.dll  C:\Windows\System32\srvcli.dll  10.0.19041.546
netutils.dll    C:\Windows\System32\netutils.dll    10.0.19041.546
sspicli.dll C:\Windows\System32\sspicli.dll 10.0.19041.1266
propsys.dll C:\Windows\System32\propsys.dll 7.0.19041.1023
oleaut32.dll    C:\Windows\System32\oleaut32.dll    10.0.19041.985
System.ValueTuple.ni.dll    C:\Windows\assembly\NativeImages_v4.0.30319_64\System.ValueTuple\79e44312b45ce276a4d6e0b31d297ad3\System.ValueTuple.ni.dll  4.8.4084.0
diasymreader.dll    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\diasymreader.dll    14.8.4084.0
System.Buffers.dll  C:\Program Files\VS2022P\Msbuild\Current\Bin\Roslyn\System.Buffers.dll  4.6.28619.1
ILLink.RoslynAnalyzer.dll   C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\analyzers\ILLink.RoslynAnalyzer.dll 6.0.5.1904
Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll  C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll    6.0.5.1901
System.Text.Json.SourceGeneration.dll   C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.1\analyzers\dotnet\cs\System.Text.Json.SourceGeneration.dll 6.0.5.6705
Microsoft.CodeAnalysis.NetAnalyzers.dll C:\Program Files\dotnet\sdk\6.0.200-preview.22055.15\Sdks\Microsoft.NET.Sdk\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll   6.0.5.1901

I hope that this sort of helps. If not, just shoot me a message and I will try to help wherever I can.

jcouv commented 2 years ago

@Unknown6656 Thanks. That helps a lot. The exception is a NullReferenceException in method PlainUnboundLambdaState.ParameterName(int) during nullable analysis, due to _parameterNames being uninitialized. The expression being analyzed is PickedColorChanged += delegate { RequestRender(); };. I tried recreating the problem with some tiny code samples but didn't succeed yet.

Would you mind digging one more piece of information? Get the version information for C:\Program Files\VS2022P\MSBuild\Current\Bin\Roslyn\Microsoft.CodeAnalysis.CSharp.dll. To do that, find the file in File Explorer, right-click on it and open Properties. In the Details tab, please copy or screenshot the Product Version (should be something like 4.1.0-....+... with a long hexadecimal sequence). Sorry, it's annoying, there's not an easy way to copy that string from the Properties UI :-/

jcouv commented 2 years ago

Oh, it looks like you already provided the version information I needed in OP: C# compiler: 4.1.0-3.22071.8 (https://github.com/dotnet/roslyn/commit/663228dd1656d5e5ca7bd38bd5c95e3d8c2b7b01). Thanks!

Unknown6656 commented 2 years ago

Wow, thanks @jcouv for responding that fast, and for tracking down the error source. The latter at least helps me track down the error in the source code and either remove the faulting code or try to refactor the code such that the compiler no longer crashes.

(I'm speaking of my own code base -- not the faulting code inside roslyn...)

jcouv commented 2 years ago

I was able to repro the crash (code sample below). It requires a conversion of anonymous function (delegate { }) to a delegate type involving nullability attributes.

Note: if you change from anonymous function syntax to lambda syntax (x, y) => {...} or (_, _) => {...} you will get a warning:

// (11,31): warning CS8622: Nullability of reference types in type of parameter 'y' of 'lambda expression' doesn't match the target delegate 'MyDelegate<object>' (possibly because of nullability attributes).
                //         PickedColorChanged += (x, y) => { System.Console.WriteLine(); };
                Diagnostic(ErrorCode.WRN_NullabilityMismatchInParameterTypeOfTargetDelegate, "(x, y) =>").WithArguments("y", "lambda expression", "MyDelegate<object>").WithLocation(11, 31)

The crash occurs when we try to report this diagnostic on an anonymous function (parameters don't have names).

        [Fact, WorkItem(59336, "https://github.com/dotnet/roslyn/issues/59336")]
        public void ParameterNameCrash()
        {
            var source = @"
#nullable enable

public delegate void MyDelegate<T>(object sender, [System.Diagnostics.CodeAnalysis.MaybeNull] T e);

class C
{
    public event MyDelegate<object>? PickedColorChanged;
    void M()
    {
        PickedColorChanged += delegate { System.Console.WriteLine(); };
        PickedColorChanged?.Invoke(this, this);
    }
}";
            var comp = CreateCompilation(new[] { source, MaybeNullAttributeDefinition });
            comp.VerifyDiagnostics(
                );
        }
Unknown6656 commented 2 years ago

Thanks very much for tracking down this bug, @jcouv! Your explanation does make sense to me. I have to admit, that I sometimes use delegate { ... } and _ => { ... } interchangeably - usually I use the former when creating anonymous functions which span multiple expression statements and do not make use of potential parameters. I will be more careful in the future -- at least until milestone 17.2 😉

jcouv commented 2 years ago

Fix should be in 17.2p2. Thanks much for the help tracking this down, @Unknown6656 !

Unknown6656 commented 2 years ago

Thank you very much for fixing the issue, Julien!

behzadian commented 2 years ago

I used preview features of C# (!!), when this feature removed, csc had been exited I removed these new features and everything goes fine

icnocop commented 1 year ago

I used preview features of C# (!!), when this feature removed, csc had been exited I removed these new features and everything goes fine

Which specific settings?

Thank you.

behzadian commented 1 year ago

I used preview features of C# (!!), when this feature removed, csc had been exited I removed these new features and everything goes fine

Which specific settings?

Thank you.

If I remembered correctly: Options -> Environment -> Preview Features -> Use Previews of the .NET SDK

CumpsD commented 5 months ago

We are facing the same error, but are developing in a pure Linux environment, and builds are done inside Docker. Do you have any instructions on how to get a crashdump in Docker? All instructions I found were Windows based

jcouv commented 5 months ago

@333fred @chsienki Would you have any tips on getting a crashdump from a .NET app inside a container?

333fred commented 5 months ago

Define the container with the correct variables to collect a dump on crash: https://learn.microsoft.com/en-us/dotnet/core/diagnostics/collect-dumps-crash.