Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

System.Reflection.ReflectionTypeLoadException - object field at offset 4 that is incorrectly aligned or overlapped by a non-object field #57

Open
rob-ack opened this issue Sep 1, 2020 · 0 comments

Comments

@rob-ack
Copy link

rob-ack commented Sep 1, 2020

System.Reflection.ReflectionTypeLoadException: 'Unable to load one or more of the requested types.
Could not load type 'ReadRequest' from assembly 'BlazorInputFile, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it contains an object field at offset 4 that is incorrectly aligned or overlapped by a non-object field.'

version 0.2.0.

this comes from.

    [StructLayout(LayoutKind.Explicit)]
    struct ReadRequest
    {
        [FieldOffset(0)] public string InputFileElementReferenceId;
        [FieldOffset(4)] public int FileId;
        [FieldOffset(8)] public long SourceOffset;
        [FieldOffset(16)] public byte[] Destination;
        [FieldOffset(20)] public int DestinationOffset;
        [FieldOffset(24)] public int MaxBytes;
    }

grafik

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant