Skip to content

Required library libhostfxr.so could not be found #573

@ckuehl

Description

@ckuehl

Related to #446, I'm seeing an issue when setting --msbuild-parameters /p:PreserveCompilationContext=true at the end of my dotnet lambda deploy-serverless command. I am using Amazon.Lambda.RuntimeSupport to run a .Net Core 2.2 app. When executing the Lambda function, I receive the following error:

A fatal error occurred, the required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/var/task/].
If this is a framework-dependent application, install the runtime in the default location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location.

I need this set as I use the https://github.com/toddams/RazorLight library for some of our HTML email templates. Is there a way to use p:PreserveCompilationContext successfully with .Net Core 2.2 and Lambda?

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.module/custom-runtimeresponse-requestedWaiting on additional info and feedback. Will move to close soon in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions