Cannot compile .NETCoreApp,v6.0 by FSharpChecker.Compile
See original GitHub issueCannot compile .NETCoreApp,v6.0 by FSharpChecker.Compile
With the latest FSharp.Compiler.Service (41.0.6) and net6.0 I cannot compile any async
code with --targetprofile:netcore
.
If the solution to this problem exists then this issue is a question. I desperately look for an answer. Otherwise this issue is a bug report because it is not possible compile or use some typical F# code.
Please find attached a project that compiles two libraries Test1.dll and Test2.dll from Test1.fs and Test2.fs respectively. FCSCompile_221105_0559.zip
Just run
dotnet run
Test1 compiles fine and creates Test1.dll ~ .NETCoreApp,Version=v3.1 (according to ILSpy).
Test2 fails to compile:
The module/namespace 'System' from compilation unit 'netstandard' did not contain the namespace, module or type 'IAsyncDisposable'
Presumably it has to be compiled as .NETCoreApp,Version=v6.0 but it is not clear how.
F# compiler options do not have anything suitable (or I miss it).
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to directly invoke F# compiler on .NET Core?
I know about dotnet build & co, but I don't want to involve them when I only need to compile a simple problem,...
Read more >Unable to compile .net 6.0 projects in VS 2022
I am unable to compile .net 6.0 projects in VS 2022 (version 17.4.3). I see error message that - MSB3971 The reference assemblies...
Read more >Compiler Options - F# | Microsoft Learn
Use F# compiler command-line options to control the compilation of your F# apps and libraries.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t wrap my head around it quite yet, need to think about it a bit more.
@T-Gro This does not help. Namely if in the attached project and code I use
@"-r:C:\...\bin\Debug\net6.0\FSharp.Core.dll"
(see below) then the problem is the same. The explicitly referenced FSharp.Core.dll is correct, .NETStandard,Version=v2.1