I'm trying to run a .net 4.8 application written in C# in a windows docker container.
I'm using eyeshot 2021
Dockerfile:
FROM mcr.microsoft.com/dotnet/framework/runtime:4.8
COPY . .
Application code:
using devDept.Eyeshot;
namespace My.Last.App
{
public class DWGHandler
{
private readonly Model _model;
public DWGHandler()
{
_model = new Model();
}
}
}
Exception:
Unhandled Exception: devDept.Graphics.GraphicsException: Error: ChoosePixelFormat() failed.
at devDept.Graphics.OglRenderContext.#=z0FbIHr$gLtUs(IntPtr #=zac5AdAIe8BUn, Int32 #=z0LtyIiZ9tI$1, ControlData #=z9Lxqa$4=, IntPtr& #=zsqxxH_UY7CKb)
at devDept.Graphics.OglRenderContext.Create()
at devDept.Eyeshot.Environment.OnHandleCreated(EventArgs e)
at devDept.Eyeshot.EnvironmentBase.OnLoaded(Object sender, EventArgs e)
I have no idea what I'm doing wrong. This works fine on a windows machine, but not in a docker container. Is there a magic switch I missed to make it work?
Edit 1:
After checking the last error, I can see:
GetLastError returned 0x7f
Which probably means:
ERROR_PROC_NOT_FOUND
127 (0x7F)
The specified procedure could not be found.