When you were converting this project to .net 7 with AOT. did you encounter the following error? how did u fix it?
it's happening on the following line.
using var dxgiFactory = device.QueryInterface<IDXGIDevice>().GetParent<IDXGIAdapter>().GetParent<IDXGIFactory>();