Skip to content

FS0193: error : Exception of type 'System.OutOfMemoryException' was thrown during compile #10581

Open
@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version of Visual Studio]
out of memory error building an F# project with 1031 modules and 15619 exported functions with at least 30000 functors within the public exported function.
The code is part of a open-source project https://github.com/channell/Cephei (with upto-date commit) built using VS2019 16.7.4.
devenv.exe peaks at 4gb of memory, and fsc.exe hits 2gb of memory. The issue appears to be the size of the intermediate ILX produced by the F# compiler before reducing to IL for code generation because compilation time became ever slower as more compile errors (I've generated the code from a tool). I've replicated the failure with msbuild (and have dump file), but could not compile with 64-bit msbuild because of tool references.

I believe this would be resolved by running fsc.exe with 64-bit msbuild, but I'm not convinced all the referenced files are AnyCPU


Original Comments

Feedback Bot on 9/23/2020, 08:10 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions