I wouldn’t have known this to be a bug, but @Elias mentioned in the chat that this should work.
I have set up a repo to test working with native libs:
The “…Demo.vl” references the dll, while “…Demo2.vl” references the csproj. Latter turns red and says I should compile with /unsafe. AllowUnsafeBlocks in the csproj is set to true.