I'm using Net 5 (C#).
I need to read a file into unmanaged memory (and write unmanaged memory to a file).
The only way I know is to use Windows API 'CreateFile' to get a handle to the file and then use ```ReadFile``` or ```WriteFile``` imported from ```Kernel32```.
This works directly in Windows.
It fails when running in a Linux Docker container under Windows 10 Pro.
It fails with:
Unable to load shared library 'kernel32' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libkernel32: cannot open shared object file: No such file or directory
How can I accomplish the read/write inside a Linux Docker container?
What I have tried:
Building a Docker image via:
FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS base
None of the above worked.