You can migrate ASP.NETCore projects in F# by using the Custom Runtime and HTTP triggers of Function Compute. You can access a function by using a browser or HTTP client tools such as cURL.


Before you begin, make sure that you have completed the following operations:
  • Install Node.js 8.6.0 or later. For more information, visit Downloads.
  • Install Docker. For more information, visit Docker Hub.
Note The examples in this topic apply to scenarios where Docker is installed. If you do not want to use Docker, you must install .NET Core 3.1. For more information about how to install .NET Core 3.1, see For more information about the commands of .NET Core 3.1, see fc-custom-demo.


  1. Run the following command to clone the sample project to the on-premises machine:
    git clone          
    Note If you do not install Git, you can download the sample project from
  2. Run the following command to go to the cloned sample project:
    1. Run the following command to go to the FSharp-demo directory:
      cd FSharp-demo
  3. Run the following command to deploy the function:
    make deploy                       
    The following output is returned:
    docker run -it -v $(pwd):/tmp bash -c "cd /tmp/FSharpDemo && dotnet publish -r linux-x64 -c Release --self-contained true && cd /tmp/FSharpDemo/bin/Release/netcoreapp3.1/linux-x64/publish && mv FSharpDemo bootstrap && chmod +x bootstrap"
    Microsoft (R) Build Engine version 16.5.0+d4cbfca49 for .NET Core
    Copyright (C) Microsoft Corporation. All rights reserved.
      Restore completed in 15.2 sec for /tmp/FSharpDemo/FSharpDemo.fsproj.
      FSharpDemo -> /tmp/FSharpDemo/bin/Release/netcoreapp3.1/linux-x64/FSharpDemo.dll
      FSharpDemo -> /tmp/FSharpDemo/bin/Release/netcoreapp3.1/linux-x64/publish/
    fun deploy -y
    Waiting for service fsharp_demo to be deployed...
            Waiting for function fc_fsharp to be deployed...
                    Waiting for packaging function fc_fsharp code...
                    The function fc_fsharp has been packaged. A total of 338 files were compressed and the final size was 39.3 MB
                    Waiting for HTTP trigger http_t to be deployed...
                    triggerName: http_t
                    methods: [ 'GET', 'POST', 'PUT', 'DELETE' ]
                    url: https://19861144305****
                    Http Trigger will forcefully add a 'Content-Disposition: attachment' field to the response header, which cannot be overwritten 
                    and will cause the response to be downloaded as an attachment in the browser. This issue can be avoided by using CustomDomain.
                    trigger http_t deploy success
            function fc_fsharp deploy success
    service fsharp_demo deploy success
    Detect 'DomainName:Auto' of custom domain 'my_domain'
    Fun will reuse the temporary domain 16225220-19861144****, expired at 2020-04-17 10:07:00, limited by 1000 per day.
    Waiting for custom domain my_domain to be deployed...
    custom domain my_domain deploy success
  4. Run the following command to invoke the deployed function:
    curl 16225220-1986114430****          
    • http://********-********* can be obtained from the output of Step 3.
    • If you use the Windows operating system, you must convert the format of the bootstrap file to UNIX.
    The following output is returned: