Skip to content

Support for --standalone on .NET Core #3924

@KevinRansom

Description

@KevinRansom

Compile a project with --standalone on the coreclr and the compiler crashes.

repro:

  1. dotnet new console -lang F#
  2. Edit the project file created and add to the propertygroup:
    $(OtherFlags) --standalone
  3. dotnet build

Observe the build failure message:

c:\temp\foop>dotnet build
Microsoft (R) Build Engine version 15.5.178.35674 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for c:\temp\foop\foop.fsproj...
  Generating MSBuild file c:\temp\foop\obj\foop.fsproj.nuget.g.props.
  Generating MSBuild file c:\temp\foop\obj\foop.fsproj.nuget.g.targets.
  Restore completed in 845.82 ms for c:\temp\foop\foop.fsproj.
FSC : error FS2014: A problem occurred writing the binary 'c:\temp\foop\obj\Debug\netcoreapp2.0\foop.dll': Error in pass3 for type Program, error: Error in GetMethodRefAsMethodDefIdx for mref = ("PrintFormatLine", "Microsoft.FSharp.Core.ExtraTopLevelOperators"), error: Exception of type 'Microsoft.FSharp.Compiler.AbstractIL.ILBinaryWriter+MethodDefNotFound' was thrown. [c:\temp\foop\foop.fsproj]

Build FAILED.

FSC : error FS2014: A problem occurred writing the binary 'c:\temp\foop\obj\Debug\netcoreapp2.0\foop.dll': Error in pass3 for type Program, error: Error in GetMethodRefAsMethodDefIdx for mref = ("PrintFormatLine", "Microsoft.FSharp.Core.ExtraTopLevelOperators"), error: Exception of type 'Microsoft.FSharp.Compiler.AbstractIL.ILBinaryWriter+MethodDefNotFound' was thrown. [c:\temp\foop\foop.fsproj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:06.56

c:\temp\foop>

Expected:
build to succeed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions