Open darind opened 4 years ago
Thanks. This will help #299 a lot. A little off-topic for your issue but, since you're here: Is alpine-x64 capable of testing Unicode features? I thought it wasn't? And maybe that's why you're also passing DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
?
@jzabroski, what are you referring to as Unicode features? I am using DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
because my app doesn't need to support any other cultures and I am using a slimmed down version of alpine-x64 which doesn't include the corresponding dependencies.
Any update on this issue? I have the same issue, when using the RazorLight package within a REST API to send a email based on razor templates. (.net core 3.1) The issue resolved when adding a reference to nuget package Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Describe the bug
I am trying to render a razor template in a docker container using .NET Core 3.1.
Getting the following error at runtime:
To Reproduce
Create a new .NET Core console application and add reference to the
RazorLight
NuGet. Also add the following to the corresponding .csproj:Render a simple template in the app:
To build the docker container use the following
Dockerfile
:Then build the image:
And run:
Expected behavior
The application runs without errors and prints "Hello world".
Information (please complete the following information):
Additional context
If I remove the
/p:PublishTrimmed=true
and/p:PublishSingleFile=true
parameters when compiling the app, then it works fine:So it looks like the IL linker is stripping some information that RazorLight depends on.