question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Internal error when type checking extension method defined in C#

See original GitHub issue

Please provide a succinct description of the issue.

Repro steps

Using the latest .NET 7 preview, I cannot compile F# that invokes an extension method which was defined in C#. Using my local compiler build, I have the same problem.

Sample: TcExprCopyRepro.zip msbuild-binlog.zip

Changing the .NET SDK to 6.0.302 (and changing the <TargetFramework>) does allow this sample to compile.

Related information

The error happens somewhere in https://github.com/dotnet/fsharp/blob/0c1eba0671d0edb86e97618e0a7678a7550befe4/src/Compiler/TypedTree/TypedTreeOps.fs#L877

image

Provide any related information (optional):

  • Operating system: Windows
  • .NET Runtime kind: .NET 7.0.100-preview.6.22352.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
nojafcommented, Jul 19, 2022

I used this unit test to debug the problem,

[<Test>]
let ``compile TcExprCopyRepro\FSharp`` () =
    let args =
        [| @"-o:C:\Users\nojaf\Projects\TcExprCopyRepro\FSharp\obj\Debug\net7.0\FSharp.dll"
           @"-g"
           @"--debug:portable"
           @"--noframework"
           @"--define:TRACE"
           @"--define:DEBUG"
           @"--define:NET"
           @"--define:NET7_0"
           @"--define:NETCOREAPP"
           @"--define:NET5_0_OR_GREATER"
           @"--define:NET6_0_OR_GREATER"
           @"--define:NET7_0_OR_GREATER"
           @"--define:NETCOREAPP1_0_OR_GREATER"
           @"--define:NETCOREAPP1_1_OR_GREATER"
           @"--define:NETCOREAPP2_0_OR_GREATER"
           @"--define:NETCOREAPP2_1_OR_GREATER"
           @"--define:NETCOREAPP2_2_OR_GREATER"
           @"--define:NETCOREAPP3_0_OR_GREATER"
           @"--define:NETCOREAPP3_1_OR_GREATER"
           @"--optimize-"
           @"--tailcalls-"
           @"-r:C:\Users\nojaf\Projects\TcExprCopyRepro\CSharp\bin\Debug\net7.0\CSharp.dll"
           @"-r:C:\Users\nojaf\.nuget\packages\fsharp.core\6.0.5-beta.22329.3\lib\netstandard2.1\FSharp.Core.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\Microsoft.CSharp.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\Microsoft.VisualBasic.Core.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\Microsoft.VisualBasic.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\Microsoft.Win32.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\Microsoft.Win32.Registry.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\mscorlib.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\netstandard.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.AppContext.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Buffers.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Collections.Concurrent.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Collections.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Collections.Immutable.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Collections.NonGeneric.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Collections.Specialized.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ComponentModel.Annotations.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ComponentModel.DataAnnotations.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ComponentModel.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ComponentModel.EventBasedAsync.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ComponentModel.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ComponentModel.TypeConverter.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Configuration.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Console.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Core.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Data.Common.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Data.DataSetExtensions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Data.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.Contracts.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.Debug.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.DiagnosticSource.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.FileVersionInfo.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.Process.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.StackTrace.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.TextWriterTraceListener.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.Tools.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.TraceSource.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Diagnostics.Tracing.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Drawing.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Drawing.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Dynamic.Runtime.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Formats.Asn1.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Formats.Tar.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Globalization.Calendars.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Globalization.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Globalization.Extensions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.Compression.Brotli.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.Compression.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.Compression.FileSystem.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.Compression.ZipFile.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.FileSystem.AccessControl.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.FileSystem.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.FileSystem.DriveInfo.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.FileSystem.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.FileSystem.Watcher.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.IsolatedStorage.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.MemoryMappedFiles.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.Pipes.AccessControl.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.Pipes.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.IO.UnmanagedMemoryStream.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Linq.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Linq.Expressions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Linq.Parallel.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Linq.Queryable.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Memory.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Http.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Http.Json.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.HttpListener.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Mail.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.NameResolution.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.NetworkInformation.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Ping.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Requests.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Security.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.ServicePoint.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.Sockets.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.WebClient.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.WebHeaderCollection.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.WebProxy.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.WebSockets.Client.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Net.WebSockets.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Numerics.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Numerics.Vectors.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ObjectModel.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.DispatchProxy.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.Emit.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.Emit.ILGeneration.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.Emit.Lightweight.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.Extensions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.Metadata.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Reflection.TypeExtensions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Resources.Reader.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Resources.ResourceManager.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Resources.Writer.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.CompilerServices.Unsafe.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.CompilerServices.VisualC.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Extensions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Handles.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.InteropServices.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.InteropServices.RuntimeInformation.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Intrinsics.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Loader.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Numerics.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Serialization.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Serialization.Formatters.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Serialization.Json.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Serialization.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Runtime.Serialization.Xml.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.AccessControl.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Claims.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.Algorithms.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.Cng.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.Csp.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.Encoding.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.OpenSsl.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.Primitives.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Cryptography.X509Certificates.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Principal.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.Principal.Windows.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Security.SecureString.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ServiceModel.Web.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ServiceProcess.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Text.Encoding.CodePages.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Text.Encoding.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Text.Encoding.Extensions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Text.Encodings.Web.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Text.Json.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Text.RegularExpressions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Channels.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Overlapped.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Tasks.Dataflow.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Tasks.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Tasks.Extensions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Tasks.Parallel.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Thread.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.ThreadPool.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Threading.Timer.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Transactions.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Transactions.Local.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.ValueTuple.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Web.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Web.HttpUtility.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Windows.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.Linq.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.ReaderWriter.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.Serialization.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.XDocument.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.XmlDocument.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.XmlSerializer.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.XPath.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\System.Xml.XPath.XDocument.dll"
           @"-r:C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\7.0.0-preview.6.22324.4\ref\net7.0\WindowsBase.dll"
           @"--target:exe"
           @"--warn:3"
           @"--warnaserror:3239"
           @"--fullpaths"
           @"--flaterrors"
           @"--highentropyva+"
           @"--targetprofile:netcore"
           @"--nocopyfsharpcore"
           @"--deterministic+"
           @"--simpleresolution"
           @"C:\Users\nojaf\Projects\TcExprCopyRepro\FSharp\obj\Debug\net7.0\.NETCoreApp,Version=v7.0.AssemblyAttributes.fs"
           @"C:\Users\nojaf\Projects\TcExprCopyRepro\FSharp\obj\Debug\net7.0\FSharp.AssemblyInfo.fs"
           @"C:\Users\nojaf\Projects\TcExprCopyRepro\FSharp\Program.fs" |]

    let result = checker.Compile(args) |> Async.RunSynchronously
    ()

What is really going on here, is a bit beyond me at this time.

0reactions
edgarfgpcommented, Jul 21, 2022

@vzarytovskii . Thanks for fixing this .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extension methods must be defined in a non-generic static ...
I ran into this when converting a project to use dependency injection. If a method declaration contains the “this” keyword, VS will give...
Read more >
Extension Methods - C# Programming Guide
Extension methods in C# enable you to add methods to existing types without creating a new derived type, recompiling, or otherwise modifying ...
Read more >
How the extension methods working internally?
Inside this class GetFirstThreeCh method has been compiled as static public method which has string type parameter. NOTE that in here there is ......
Read more >
C# Error CS1110 - Cannot define a new extension method ...
CS1110 – Cannot define a new extension method because the compiler required type '{0}' cannot be found. Are you missing a reference to...
Read more >
Extension methods must be defined in a top level static class ...
Reason for the Error & Solution. Extension Methods must be defined on top level static classes, 'name' is a nested class.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found